MDBDataTable search filter is not honored after state change

Topic: MDBDataTable search filter is not honored after state change

Clint Milner asked 11 months ago

Expected behavior The datatable is listens to the search term, and the rows are filtered. State updates, which causes the datatable to re-render, but the search term in the filter should be honored.

Actual behavior After a state change, the datatable re-renders, and the search term is ignored until the next onChange event.

Resources (screenshots, code snippets etc.)

Konrad Stępień staff answered 11 months ago

Hi @Clint Milner,

Thank you for the founded bug!

Can you tell me what we can reproduce this issue?

We will try to fix this in the near future.

Best regards.

Clint Milner answered 11 months ago

Hello @Konrad Stępień ,

I have prepared a sample React app that demonstrates this bug.

Please let me know if you have any troubles, or if there is anything else I can help with.

Kind Regards

Clint Milner commented 11 months ago

@Konrad Stępień
I've also just created a Snippet here:

Konrad Stępień staff commented 11 months ago

Hi @Clint Milner,

Very thank you for part of your code. I did add this for our ToDo list, and We'll fix it in the near future.

Best regards, Konrad.

Prajapati answered 8 months ago

Can anyone please share code for add custom filter in datatable, I'm using below code:

Konrad Stępień staff commented 8 months ago

Hi @Prajapati, Can you correct your answer? I mean, can you paste snippet.

Nikhil Singh answered 4 months ago

It is not fixed yet in the latest version also

Piotr Glejzer staff commented 4 months ago

we will re-write datatable component soon but I will try to fix it as soon as possible.

Please insert min. 20 characters.


Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: React
  • MDB Version: 4.15.0
  • Device: MacBook Pro
  • Browser: Firefox
  • OS: OSX
  • Provided sample code: No
  • Provided link: Yes