Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ScrollSpyOnce prop is not working #876

Open
Mario8419 opened this issue Nov 26, 2024 · 0 comments
Open

ScrollSpyOnce prop is not working #876

Mario8419 opened this issue Nov 26, 2024 · 0 comments

Comments

@Mario8419
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant