react-scroll
react-scroll copied to clipboard
How to activate last element when the viewport is smaller than 100vh?
Hi,
I ran into a problem as I can't activate the last element. This occurs because the last element does not have a height of 100vh. In my case, I can't have the last section 100vh.
Also, I have noticed that this issue has not been solved since 2016! (#161 #335 #396 #466)
Does anyone know how I can activate the last element when the viewport is smaller?
Best regards, Ugnius
Yes, there's many issues like this. Could you provide a plunkr/codepen demonstrating your issue?
There might be ways to come around it.
Yes, there's many issues like this. Could you provide a plunkr/codepen demonstrating your issue?
There might be ways to come around it.
https://codesandbox.io/s/react-scroll-issue-wktg3?file=/src/App.tsx
Hacky solution: https://codesandbox.io/s/react-scroll-issue-forked-pdczf?file=/src/App.tsx
Hacky solution: https://codesandbox.io/s/react-scroll-issue-forked-pdczf?file=/src/App.tsx
Doesn't work with hash though. Any other workaround?
Hacky solution: https://codesandbox.io/s/react-scroll-issue-forked-pdczf?file=/src/App.tsx
@ugnelis Thanks for the working solution.
@fisshy Tell me please, when can this become part of the library itself?
Just to display the list using map
- I had to do something like this. Looks completely illegible.)
@WebDevMaster2016 I am not a maintainer of this library, By the way, I have stopped using react-scroll
because it is too buggy and unpredictable (e.g., random jumps). I had a lot of hard time using it properly. I have replaced react-scroll
library with https://www.npmjs.com/package/react-ui-scrollspy in my projects
@WebDevMaster2016 I am not a maintainer of this library, By the way, I have stopped using
react-scroll
because it is too buggy and unpredictable (e.g., random jumps). I had a lot of hard time using it properly. I have replacedreact-scroll
library with https://www.npmjs.com/package/react-ui-scrollspy in my projects
@ugnelis Oh, I'm sorry) I really did not see that you are only the author of the question, and not the maintainer of the library. I already edited my previous question) https://www.npmjs.com/package/react-ui-scrollspy - looks promising