MDBDatatable clickEvent associated with wrong row after sort


Topic: MDBDatatable clickEvent associated with wrong row after sort

Sophie Liu asked 4 years ago

Expected behavior

I have used the 'clickEvent' property to attach a function to each row of the table, where clicking the row does a search for the item in that row.

Actual behavior

After sorting the table, clicking on a row of the table performs a search for a different item. The functions are jumbled relative to the data in the rows. How can I fix this jumbling?


Piotr Glejzer staff commented 4 years ago

i think its a bug with updates sorting state after sort so we have to fix this in our source code. But can you show me your code about that problem?


Sophie Liu commented 4 years ago

Sorry, my bad, the problem was in the way I was assigning functions to row objects. Still not sure what went wrong, but moving the assignment to a different place fixed the problem. Thank you for your reply!


FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Closed

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: 4.27.0
  • Device: Macbook Pro
  • Browser: Chrome
  • OS: MacOS
  • Provided sample code: No
  • Provided link: No