ScrollArea doesn't work in a dynamic height container
See original GitHub issueWhat package has an issue
Describe the bug
ScrollArea
doesn’t work in a flex container when the parent is flexGrow: 1
or height: 100%
In which browser did the problem occur
Chrome
If possible, please include a link to a codesandbox with the reproduced problem
https://codesandbox.io/s/eloquent-margulis-d7pv7?file=/src/Content.tsx
Do you know how to fix the issue
No
Are you willing to participate in fixing this issue and create a pull request with the fix
No response
Possible fix
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:19 (7 by maintainers)
Top Results From Across the Web
Scrollbar without fixed height/Dynamic height with scrollbar
I think it's not the correct answer. It won't work without a fixed height for the body element. – Equanox. Feb 22, 2018...
Read more >QScrollArea content hidden if height is not provided #7248
When you don't specify a height on a QScrollArea but you do set a min-height, the content in the scrollarea is hidden somehow....
Read more >ScrollRect : how to dynamically increase the content size
For first practice, place the ScrollView object in the middle and set the anchors of Viewport to 0,1 so it takes the whole...
Read more >Element size and scrolling - The Modern JavaScript Tutorial
Setting scrollTop to 0 or a big value, such as 1e9 will make the element scroll to the very top/bottom respectively. Don't take...
Read more >ScrollView - React Native
Keep in mind that ScrollViews must have a bounded height in order to work, since they contain unbounded-height children into a bounded container ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Scrollarea works fine, you just did not put it in flex container. https://codesandbox.io/s/interesting-curran-vn9ms3?file=/src/App.tsx
I’ve provided all examples I had, the general approach is to wrap ScrollArea in flex container and setting
flex: 1
on it. You can find examples in previous sandboxes and Navbar.Section component source code as an example.