question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Inner grid width not recalculated after hiding columns in dynamic mode

See original GitHub issue

tldr if you are using dynamic row heights and remove/hide a column, the inner grid width is not recalculated.

Repro steps:

  1. clone this repo (https://github.com/jamesonhill/react-base-table-repro) and run yarn && yarn start
  2. Click the button to remove the first column
  3. Horizontally scroll to the end of the grid

Expected:

  1. Inner grid width is calculated and displays as total columns width

Actual:

  1. 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:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
nihgwucommented, Jun 25, 2020

no need, I can repro it locally, and I’m working on a fix on that

0reactions
jamesonhillcommented, Jun 25, 2020

Oh, nice I didn’t know you could use shareable links on the playground. I’ll add that example, one minute.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found