patricktran / react-table-hoc-draggable-columns

ReactTable HOC for draggable columns
https://patricktran.github.io/react-table-hoc-draggable-columns/
MIT License
28 stars 24 forks source link

Uncaught type error #14

Closed Teipo closed 4 years ago

Teipo commented 4 years ago

Hi

  1. I am receiving an uncaught type error.

image

  1. I am also getting a memory leak error image

  2. I think some logging is active: image

patricktran commented 4 years ago

Yes, I unfortunately left a couple of console.logs in by mistake. These will be removed in the next update.

Regarding your uncaught type error, can you please provide sample code or an example on codesandbox?

Teipo commented 4 years ago

Hi Patrick,

I had some issues when updating the order of columns in react-table via the function 'onDropSuccess', I tried setting my custom component state again and resetting the columns in react-table, basically re-rendering the table, and that's when the error occurred, even though the order and render was fine, I still got the error message.

I removed the setState({columns}) in my custom component when 'onDropSuccess' is called and the column order changed, and did not re-render the react-table component, then it works fine :)

So the error indeed was on my end.