We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
from
to
from @aleclarson on discord:
You need to provide a start value: from: { scrollTop: 0 }
from: { scrollTop: 0 }
This fixes it, yes, thanks! 😄 (I guess on v8.0.27 the lib used to do that automatically.)
To achieve my behavior of a initial scrollTop I have to do this now:
const { scrollTop } = useSpring({ from: { scrollTop: 0 } to: { scrollTop: 100 }, immediate: true });
And then to set immediate: false on subsequent calls.
immediate: false
I can live with this... hovever I would still consider this a bug, and expect this expression to work as an equivalent, just like it does in v8.0.27:
v8.0.27
const { scrollTop } = useSpring({ from: { scrollTop: 100 } });
and this should be possible too:
const { scrollTop } = useSpring({ from: { scrollTop: 100 } to: { scrollTop: 100 } });
It works with animated.span so this is most likely an issue in animated.div's scrollTop handling: https://codesandbox.io/s/react-spring-v9-scrolltop-bug-forked-7h3vf?file=/src/App.js
animated.span
animated.div
Originally posted by @0x6431346e in #985 (comment)
The text was updated successfully, but these errors were encountered:
I am working on this one @joshuaellis
Sorry, something went wrong.
fix: scrollTop is not set when from & to are equal pmndrs#1185
c454ce4
fix: scrollTop is not set when from & to are equal #1185 (#1354)
57bb427
resolved by #1354
fix(tooltip): Show tooltip on first tap for touch devices (pmndrs#1185)
f712cfa
Rohanhacker
No branches or pull requests
from @aleclarson on discord:
This fixes it, yes, thanks! 😄 (I guess on v8.0.27 the lib used to do that automatically.)
To achieve my behavior of a initial scrollTop I have to do this now:
And then to set
immediate: false
on subsequent calls.I can live with this... hovever I would still consider this a bug, and expect this expression to work as an equivalent, just like it does in
v8.0.27
:and this should be possible too:
It works with
animated.span
so this is most likely an issue inanimated.div
's scrollTop handling:https://codesandbox.io/s/react-spring-v9-scrolltop-bug-forked-7h3vf?file=/src/App.js
Originally posted by @0x6431346e in #985 (comment)
The text was updated successfully, but these errors were encountered: