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

handle constraint issue when resizableColumns is true and selectableRows set to 'none' #1433

Closed
grant-carpenter opened this issue Jul 23, 2020 · 3 comments
Labels

Comments

@grant-carpenter
Copy link

When a table is created with resizableColumns: true and selectableRows: 'none', column handles can be dragged beyond the ranges of their columns. This creates display errors. It appears to be the result of TableResize.isLastColumn() not respecting the selectableRows prop.

Expected Behavior

  1. WHEN a datatable with at least three columns is created with resizable columns and no selectable rows
  2. AND a user drags the second-to-last column to the right
    THEN
    The dragged handle's position should be constrained.

Current Behavior

  1. WHEN a datatable with at least three columns is created with resizable columns and no selectable rows
  2. AND a user drags the second-to-last column to the right
    THEN
    The dragged handle can be dragged beyond its columns width, creating a display error. See example:

Screen Shot 2020-07-23 at 11 50 17 AM

Steps to Reproduce (for bugs)

See sandbox here: https://codesandbox.io/s/muidatatables-custom-toolbar-ddw18

  1. Create a data-table with at least three columns and the following options:
    {
    selectableRows: 'none',
    resizableColumns: true,
    }
  2. Click on the second-to-last column handle. "Title" handle in the example.
  3. Drag handle to the far right.

Your Environment

Tech Version
Material-UI 4.10.2
MUI-datatables 3.2.0
React 16.9.0
browser Chrome 81
@patorjk patorjk added the bug label Jul 23, 2020
@patorjk
Copy link
Collaborator

patorjk commented Jul 23, 2020

Thank for you the report! I can confirm this, I'll see about getting a fix in for the next release.

@patorjk
Copy link
Collaborator

patorjk commented Jul 25, 2020

Fixed in 3.3.0

@patorjk patorjk closed this as completed Jul 25, 2020
@grant-carpenter
Copy link
Author

That was super quick. Thank you for the fast response.

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

No branches or pull requests

2 participants