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

Column resize problems

Open davidhaimson opened this issue 8 years ago • 13 comments

Our grid is configured to allow column resizing, and we put a dropdown menu in each column header, which gives options for re-sorting based on that column.

The following works correctly for us with fixed-data-table-2 release 0.7.17. But in release 0.8.8, we observe the following problems:

Problem 1

Expected Behavior

Drag the edge of a column header, right or left: the column should resize to the width you specified. Click any other column header: the dropdown appears, the previously resized column should be unchanged.

Current Behavior

Drag the edge of a column header, right or left: the column resizes correctly. Click any other column header: the dropdown appears, but the previously resized column resets to a minimum width.

Problem 2

Expected Behavior

Drag the edge of a column header, right or left: the column should resize to the width you specified. Drag the edge of a different column header, right or left: the blue line should follow the cursor.

Current Behavior

Drag the edge of a column header, right or left: the column resizes correctly. Drag the edge of a different column header, right or left: the blue line is offset from the cursor, apparently by the distance between the two columns.

Problem 3

Expected Behavior

Drag the edge of a column header, right or left: the column should resize to the width you specified. Drag the edge of a different column header, right or left: the column should resize to the width you specified. Click any other column header: the dropdown appears, the previously resized columns should be unchanged.

Current Behavior

Drag the edge of a column header, right or left: the column resizes correctly. Drag the edge of a different column header, right or left: the column resizes correctly. Click any other column header: the dropdown appears, but the second resized column (but not the first) resets to a minimum width.

Context

These problems do not occur in release 0.7.17, but they do occur in release 0.8.8, so we cannot update. We would like to update because we need column resize on touch devices, but we can't.

Your Environment

  • Version used: 0.8.8
  • Browser Name and version: Chrome Version 63.0.3239.132 (Official Build) (64-bit), Firefox 57.0.1 (64-bit)
  • Operating System and version (desktop or mobile): macOS 10.13.2
  • Link to your project: (not public)

davidhaimson avatar Jan 05 '18 18:01 davidhaimson

Thanks for filing. This is a regression caused by #268

I'll push a fix which supports both cases shortly and release w/ 0.8.9.

wcjordan avatar Jan 05 '18 21:01 wcjordan

Fixed w/ 0.8.9

wcjordan avatar Jan 09 '18 02:01 wcjordan

I am using version 0.8.9 and I am still having resize issues. Chrome Version 64.0.3282.140 (Official Build) (64-bit) and Mac OS version 10.12.6. The blue line shows just to the left of the first column division even if I click on a different column divider. The blue line keeps tracking with the mouse after releasing the mouse button. Clicking causes the column divider to move to the location clicked.

lduane avatar Feb 05 '18 21:02 lduane

Is this with the example page or a separate size?

wcjordan avatar Feb 05 '18 21:02 wcjordan

It is with a table in the application I am writing.

On Feb 5, 2018, at 3:24 PM, Chris Jordan <[email protected] mailto:[email protected]> wrote:

Is this with the example page or a separate size?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/schrodinger/fixed-data-table-2/issues/276#issuecomment-363226114, or mute the thread https://github.com/notifications/unsubscribe-auth/AFl28vsGFKH-y2ZwasRl16a5W4-dVfeLks5tR3GSgaJpZM4RUyrH.

lduane avatar Feb 05 '18 21:02 lduane

Can you create a reproduction with jsfiddle or codepen?

wcjordan avatar Feb 05 '18 21:02 wcjordan

I'll give it a shot. It is a fairly complex table.

lduane avatar Feb 05 '18 21:02 lduane

I also have the above mentioned problem @lduane. The resizing is not released when we release mouse.

zuyetawarmatik avatar Feb 09 '18 10:02 zuyetawarmatik

I suspect you need to do additional wiring to set the isColumnResizing prop to false when column resize stops, but I'll need a reproduction to help further. I recommend looking at the column resizing example for guidance.

wcjordan avatar Feb 09 '18 12:02 wcjordan

@wcjordan that fixed my problem, thanks I forgot to add isColumnResizing={false} when creating <Table/>. It used to work without isColumnResizing though, but maybe because #280 that makes it not working there after.

zuyetawarmatik avatar Feb 09 '18 13:02 zuyetawarmatik

Could you point me to the release it worked without and a JsFiddle reproducing. To my knowledge it has never worked without it, but if it's a regression, I'd like to fix it.

wcjordan avatar Feb 09 '18 13:02 wcjordan

I have checked again my code base and I used to have that prop (just that it's not directly put at the Table itself but transferred from parent's prop). So you may not need to be worried about that. Thanks.

zuyetawarmatik avatar Feb 09 '18 14:02 zuyetawarmatik

Cool, no problem. I'd definitely like to fix the API, since it was poorly designed. Just don't want to introduce a breaking change until the v1 release or later. Thanks

wcjordan avatar Feb 09 '18 14:02 wcjordan