Posted 8 December 2024, 2:06 pm EST
- Updated 8 December 2024, 2:11 pm EST
Hi Akshay,
Unfortunately, the first suggestion doesn’t work, even in your demo. It adds a 15px space next to the scrollbars.
The second option doesn’t display any scrollbars in my case.
Here’s a demo highlighting the issues I’m experiencing:
Context:
I am dynamically generating a grid with a table using relative units. I would like the table to render within the available space and show scrollbars when necessary (as in the first row). However, when the table is smaller than the available space, I want it to adjust to its content and display scrollbars next to the table.
When the table is larger than the available space, it works fine. However, it’s not adjusting to the available space as expected.
Using the suggested solutions causes the following issues:
Scrollbars disappear.
The table is displayed larger than it should be.
Only the vertical scrollbar is displayed, with the horizontal scrollbar appearing only after scrolling down the vertical one.
Grid_Sizing_Overview_React2.zip
Greetings,