Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Column resize problems #276

Closed
davidhaimson opened this issue Jan 5, 2018 · 13 comments · Fixed by #278
Closed

Column resize problems #276

davidhaimson opened this issue Jan 5, 2018 · 13 comments · Fixed by #278

Comments

@davidhaimson
Copy link
Contributor

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)
@wcjordan
Copy link
Member

wcjordan commented Jan 5, 2018

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
Copy link
Member

wcjordan commented Jan 9, 2018

Fixed w/ 0.8.9

@lduane
Copy link

lduane commented Feb 5, 2018

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.

@wcjordan
Copy link
Member

wcjordan commented Feb 5, 2018

Is this with the example page or a separate size?

@lduane
Copy link

lduane commented Feb 5, 2018 via email

@wcjordan
Copy link
Member

wcjordan commented Feb 5, 2018

Can you create a reproduction with jsfiddle or codepen?

@lduane
Copy link

lduane commented Feb 5, 2018

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

@zuyetawarmatik
Copy link

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

@wcjordan
Copy link
Member

wcjordan commented Feb 9, 2018

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.

@zuyetawarmatik
Copy link

zuyetawarmatik commented Feb 9, 2018

@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.

@wcjordan
Copy link
Member

wcjordan commented Feb 9, 2018

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.

@zuyetawarmatik
Copy link

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.

@wcjordan
Copy link
Member

wcjordan commented Feb 9, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants