Topic: MDBDataTable search filter is not honored after state change
                  
                  Clint Milner
                  free
                  asked 6 years 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.)
https://www.youtube.com/watch?v=AS5STv01Es4
                      
                      Nikhil Singh
                      free
                        answered 5 years ago
                    
It is not fixed yet in the latest version also
Piotr Glejzer staff commented 5 years ago
we will re-write datatable component soon but I will try to fix it as soon as possible.
                      
                      Prajapati
                      free
                        answered 5 years ago
                    
Can anyone please share code for add custom filter in datatable, I'm using below code:
Konrad Stępień staff commented 5 years ago
Hi @Prajapati, Can you correct your answer? I mean, can you paste snippet.
                      
                      Clint Milner
                      free
                        answered 6 years ago
                    
Hello @Konrad Stępień ,
I have prepared a sample React app that demonstrates this bug.
https://github.com/clintmilner/mdb-datatable-bug
Please let me know if you have any troubles, or if there is anything else I can help with.
Kind Regards
Clint Milner free commented 6 years ago
@Konrad Stępień 
I've also just created a Snippet here:
https://mdbootstrap.com/snippets/react/milner/1124741
Konrad Stępień staff commented 6 years 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.
                      
                      Konrad Stępień
                      staff
                        answered 6 years 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.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Free
 - Premium support: No
 - Technology: MDB React
 - MDB Version: 4.15.0
 - Device: MacBook Pro
 - Browser: Firefox
 - OS: OSX
 - Provided sample code: No
 - Provided link: Yes