Skip to content

ScrollSpyOnce prop is not working #876

@Mario8419

Description

@Mario8419

Description

The scrollSpyOnce prop is not functioning as expected. The animation restarts each time the component comes into the viewport instead of running only once.

Code Example

<CountUp
  scrollSpyOnce
  end={amount}
  decimals={2}
  formattingFn={num => Intl.NumberFormat(getUserLocale(), {
    minimumFractionDigits: 2,
    maximumFractionDigits: 2
  }).format(num)}
/>{' '}{selectedCurrency}

Observed Behavior
The counter animation starts again and again whenever the component comes into view, despite using the scrollSpyOnce prop.

Expected Behavior
The animation should only run once when the component comes into view for the first time.

Additional Details
Version: 6.5.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions