question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Column Drag and Drop issue with excluded columns

See original GitHub issue

I 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

Sandbox Example

  1. Define your columns
  2. Set one column with display: 'exclude'
  3. Render datatable
  4. 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:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
mcmastermindcommented, Jun 22, 2020

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.

0reactions
patorjkcommented, Jun 22, 2020

No problem, thanks for the report!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found