Check out this code sandbox that showcases a Logs
React component functioning perfectly.
The implementation incorporates react-scroll-to-bottom to display a page with a header and logs. What's interesting is that the log section dynamically adjusts its size to fit the screen height due to the flexbox property being used.
However, when attempting to nest the Logs
component within an App
component, an issue arises where an extra scrollbar appears alongside the scroll-to-bottom scrollbar, making the log section too tall. The behavior can be seen here.
This could be attributed to using 100vh
for the Logs
component height. Switching this to 100%
causes ScrollToBottom to malfunction by displaying all log content as a normal div. It seems like ScrollToBottom requires specific height units such as px
, em
, or vh
to function correctly. How can I overcome this challenge and make ScrollToBottom fill the screen height?