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

Side effects when dragging columns with nested MUIDataTables #1406

Closed
cahna opened this issue Jul 11, 2020 · 3 comments
Closed

Side effects when dragging columns with nested MUIDataTables #1406

cahna opened this issue Jul 11, 2020 · 3 comments
Labels

Comments

@cahna
Copy link

cahna commented Jul 11, 2020

Expected Behavior

In a situation where a MUIDataTable is nested within an expanded row, dragging columns from one MUIDataTable should only affect the selected table.

Current Behavior

Dragging the columns of the outer MUIDataTable will cause the inner MUIDataTable's columns to move, too. Once the column is dropped, the correct column orders are present on both the inner and outer MUIDataTable.

demo

Steps to Reproduce (for bugs)

See this sandbox: https://codesandbox.io/s/fervent-minsky-9eem8?file=/src/App.js

Try:

  1. Expand a row
  2. Drag a column on the outer MUIDataTable
  3. Watch the inner MUIDataTable's columns move along with the outer columns
  4. Release/drop the outer column

Once complete, the columns will be in the correct positions. It only looks strange when dragging the column.

Your Environment

Tech Version
Material-UI 4.11.0
MUI-datatables 3.1.5
React 16.13.1
browser Chromium
@patorjk
Copy link
Collaborator

patorjk commented Jul 11, 2020

I've released a beta version which should hopefully fix this issue:

npm install mui-datatables@v3.2.0-beta.1

Codesandbox: https://codesandbox.io/s/hungry-dubinsky-wr1yu

@cahna
Copy link
Author

cahna commented Jul 11, 2020

Thanks! I can confirm that the beta version fixes the issue in my project.

@patorjk
Copy link
Collaborator

patorjk commented Jul 16, 2020

Fixed in version 3.2.0.

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