DataTable: Global search won't reset when the field is empty on react 17 #3819
Labels
Type: Bug
Issue contains a defect related to a specific component.
Milestone
Describe the bug
When using the globalFilter parameter of the DataTable, it won't reset the searched items when clearing the search input. Let's say you have 100 items and search for the letter 'a', now you have 20 items, if you clear the input or erase the word, you still have 20 items, it won't reset when the input is empty.
You can see this behavior in the examples: https://www.primefaces.org/primereact/datatable/crud.
You start out with 30 items, if you search for the letter 'z' you will have 4 items, if you erase it, you still have 4 items.
Reproducer
https://codesandbox.io/s/soyt1t
PrimeReact version
8.0.0
React version
18.x
Language
TypeScript
Build / Runtime
Create React App (CRA)
Browser(s)
Chrome
Steps to reproduce the behavior
Expected behavior
When clearing the input, all the existing items should be displayed.
The text was updated successfully, but these errors were encountered: