Column Drag and Drop issue with excluded columns
See original GitHub issueI am experiencing an issue when dragging columns when there are columns with the display property set to exclude. It looks like, in useColumnDrop.js the headCellRefs array indexes do not align with the columnOrder argument.
Expected Behavior
Columns should be able to drag and drop smoothly regardless of display property.
Current Behavior
useColumnDrop.js throws and error on line 38 when columns with the property display: 'exclude' is set.
Error: TypeError: Cannot read property 'offsetWidth' of undefined
Steps to Reproduce
- Define your columns
- Set one column with
display: 'exclude' - Render datatable
- Try to drag a column
Your Environment
| Tech | Version |
|---|---|
| Material-UI | 4.10.2 |
| MUI-datatables | 3.1.1 |
| React | 16.13.1 |
| browser | FireFox |
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
Columns in the Excluded Drop Target - Oracle Help Center
A column in the Excluded drop target is not included in the view results but still remains as part of the analysis. A...
Read more >Ability to transition issues using drag and drop when target status is ...
Hi Aggelos,. One issue we have with the implementation of this is how to distinguish between a drag to rank and a drag...
Read more >sql - Exclude a column using SELECT * [except columnA ...
In your select statement, just highlight the referenced columns folder above and drag and drop it into the query window. It will paste...
Read more >AddColumns, DropColumns, RenameColumns, and ...
DropColumns excludes columns, and ShowColumns includes columns. Use the RenameColumns function to rename one or more columns of a table by ...
Read more >Buttons Plugin colvis columns option effects wrong column ...
If anyone is having trouble due to this issue a workaround is to not exclude the column(s) via the columns attribute but to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Works like a charm! The code sandbox works as well as the local build of the project I am working on.
Keep up the good work, and thank you for tackling this so quickly.
No problem, thanks for the report!