Inner grid width not recalculated after hiding columns in dynamic mode
See original GitHub issuetldr if you are using dynamic row heights and remove/hide a column, the inner grid width is not recalculated.
Repro steps:
- clone this repo (https://github.com/jamesonhill/react-base-table-repro) and run
yarn && yarn start
- Click the button to remove the first column
- Horizontally scroll to the end of the grid
Expected:
- Inner grid width is calculated and displays as total columns width
Actual:
- Inner grid width still includes the width of the hidden column
This only seems to happen in dynamic mode. You can technically work around it by doing tableRef.current?.table?.bodyRef.resetAfterColumnIndex(0, false);
, however that’s pretty hacky and should work out of the box.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
grid-auto-columns - CSS: Cascading Style Sheets | MDN
The grid-auto-columns CSS property specifies the size of an implicitly-created grid column track or pattern of tracks.
Read more >When flexbox items wrap in column mode, container does not ...
This inner list is vertical and should wrap into columns when needed. When wrapping into more columns, its width should increase to make...
Read more >An Auto-Filling CSS Grid With Max Columns of a Minimum Size
If a grid cell goes under a user-specified width, the auto-filling grid will readjust itself and decrease the number of columns.
Read more >Grid Cheatsheet
Any rows/columns defined by grid-template-areas but not sized by ... size (as specified by min-width/min-height) of the grid items occupying the grid track....
Read more >JavaScript Data Grid Column widths - Handsontable
Configure column widths, using an array or a function. Let your users manually change column widths using Handsontable's interface.
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
no need, I can repro it locally, and I’m working on a fix on that
Oh, nice I didn’t know you could use shareable links on the playground. I’ll add that example, one minute.