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

Uncaught TypeError: Cannot read property 'offsetParent' of undefined when draggableColumns is enabled #1359

Open
achmadk opened this issue Jun 22, 2020 · 9 comments

Comments

@achmadk
Copy link

achmadk commented Jun 22, 2020

Expected Behavior

Draggable columns can work properly

Current Behavior

Get error Uncaught TypeError: Cannot read property 'offsetParent' of undefined

Steps to Reproduce (for bugs)

  1. Open https://dashboard-preview.web.app/timah, please wait until all charts and tables has been loaded.
  2. Click inspect element, then open console tab.
  3. Select table you want to drag its column, e.g. Tender Amount by Vendor.
  4. Drag one column inside that table.
  5. When that column is dragging, check the console that displays Uncaught TypeError: Cannot read property 'offsetParent' of undefined.

Your Environment

Tech Version
@material-ui/core 4.10.2
mui-datatables 3.1.0
react 16.13.1
browser Google Chrome on Linux (Ubuntu 20.04)
@patorjk
Copy link
Collaborator

patorjk commented Jun 22, 2020

Yikes, that's a bad bug :/. It only happens when selectableRows: "none". I've got a fix in development. I'm going to do a little more testing and hopefully push a 3.1.1 version a little later tonight.

@achmadk
Copy link
Author

achmadk commented Jun 22, 2020

thanks for your quick response, @patorjk .

@patorjk
Copy link
Collaborator

patorjk commented Jun 22, 2020

No problem, thank you for the quick report! I've push out a 3.1.1 patch that has draggable columns working when selectableRows="none". If you see anything else please let me know.

@achmadk
Copy link
Author

achmadk commented Jun 22, 2020

I have updated mui-datatables to 3.1.1. I have forgot that the website use iframe. Drag and drop feature still doesn't work for me. Only display warning both [Violation] 'dragstart' and [Violation] 'drop' handler into console tab.

@patorjk
Copy link
Collaborator

patorjk commented Jun 22, 2020

Can you show me an example? I can't seem to re-create this.

@patorjk
Copy link
Collaborator

patorjk commented Jun 22, 2020

I'm aiming to do another patch release tonight. I'm not sure if this will solve your problem, but if you have a moment can you try this beta version:

npm install mui-datatables@3.1.2-beta.0

@achmadk
Copy link
Author

achmadk commented Jun 22, 2020

sorry, that beta version still doesn't fix this issue.

@patorjk
Copy link
Collaborator

patorjk commented Jun 22, 2020

Can you show me an example? I'm unable to reproduce the problem.

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

No branches or pull requests

3 participants