Animation is not triggered when prop changes #112
Replies: 4 comments
-
|
Here is the sandbox |
Beta Was this translation helpful? Give feedback.
-
|
Hi, thanks for the repro 👋. It appears the issue is that React is recreating the component here instead of updating it. You can see it in this fork if you open the console. Not sure what a workaround is, but if that's the issue it's not NumberFlow's so I'll convert this to a discussion for now. |
Beta Was this translation helpful? Give feedback.
-
|
@barvian @mickdewald hi did you found any solution yet? |
Beta Was this translation helpful? Give feedback.
-
|
Same im struggling any solutions yet ? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
NumberFlow version
0.5.5
Framework version
next 15.1.6
Describe the bug and the steps to reproduce it
I am trying to use NumberFlow in a table cell in a React Table (TanStack Table).
But when the value changes, the new value will only be displayed without an animation.
onAnimationsStartis never fired.But the animation does work, when I use
so it's working, but not when the prop changes.
I tried various things, like using key, memo etc, but I am out of ideas.
Where is my mistake?
Minimal reproduction
https://codesandbox.io/p/sandbox/px8sn9
Beta Was this translation helpful? Give feedback.
All reactions