fixed-data-table-2 icon indicating copy to clipboard operation
fixed-data-table-2 copied to clipboard

Resizer knob on every cell in column

Open jackie-benowitz opened this issue 8 years ago • 3 comments

Expected Behavior

When a column is marked as resizable, it'll be useful to have a knob on every cell in a column to allow for resizing, not just the Header cell.

Current Behavior

Right now the Resizer Knob only shows up on the Header cell for the column. If you need to resize a column, you need to find the Header, however this will grow all the cells beneath it and the group header above it.

Possible Solution

I'm not too far into reading the code, but I'm attempting to see how the header cell is rendered differently than the others, and apply that change to the other cells.

Your Environment

  • Version used: Currently on actually normal fixed-data-table, but looking to upgrade to this.
  • Link to your project: indicative.com

jackie-benowitz avatar Jun 22 '17 20:06 jackie-benowitz

Hey @jackie-benowitz, this is an interesting idea. I think the way we'd prefer to approach it would be to make the resize knob a reusable component which users could easily add to their cells.

Right now the resize component is added as part of FixedDataTableCell here. To get things off the ground quickly, I'd recommend trying to fork the repo and add the onColumnResize prop to rows here, similar to how it's added to headers here and here. Note you'll probably need to pass things down through the FixedDataTableBufferedRows component here.

For the longer term, if you want to put that functionality behind a new prop and put up a pull request, I think we would accept that. The reusable component aspect I mentioned above would probably be longer term as we refactor the codebase to be more composable.

wcjordan avatar Jun 23 '17 06:06 wcjordan

Great thanks! I'm surprised no one has asked for it already!

jackie-benowitz avatar Jun 23 '17 13:06 jackie-benowitz

Our new work for more flexible resizing should support this in a future release. It won't come out of the box, but we will provide an easier to work w/ API and some examples which should get us most of the way to this.

wcjordan avatar May 04 '20 17:05 wcjordan