Open lomocc opened 3 months ago
@react-spring/web
@react-spring/three
@react-spring/native
@react-spring/konva
@react-spring/zdog
9.7.3
animated.div will remove the .00 end of the number
.00
https://codesandbox.io/p/sandbox/ecstatic-https-t8kt3d?file=%2Fsrc%2FApp.tsx%3A14%2C9
first click the number, second click the update.
<animated.div className={styles.content}>{props.width.to(x => x.toFixed(2))}</animated.div>
should always display the toFixed(2) number, just like 200.00
toFixed(2)
200.00
Which react-spring target are you using?
@react-spring/web
@react-spring/three
@react-spring/native
@react-spring/konva
@react-spring/zdog
What version of react-spring are you using?
9.7.3
What's Wrong?
animated.div will remove the
.00
end of the numberTo Reproduce
https://codesandbox.io/p/sandbox/ecstatic-https-t8kt3d?file=%2Fsrc%2FApp.tsx%3A14%2C9
first click the number, second click the update.
Expected Behaviour
should always display the
toFixed(2)
number, just like200.00
Link to repo
https://codesandbox.io/p/sandbox/ecstatic-https-t8kt3d?file=%2Fsrc%2FApp.tsx%3A14%2C9