In my data there can be fields with empty strings. I noticed that the dropdown filtering doesn't work for them - it treats them the same as the "All" keyword, which leads to odd results when selecting them. You can see it in action here:
It treats an empty string as well as the "All" keyword as the same, and then passes an empty string to the onFilterUpdate method (filterUpdate in MUIDataTable.js). filterUpdate hits the "default" in the switch statement for dropdowns and removes the filters on an empty string:
In my data there can be fields with empty strings. I noticed that the dropdown filtering doesn't work for them - it treats them the same as the "All" keyword, which leads to odd results when selecting them. You can see it in action here:
https://codesandbox.io/s/muidatatables-custom-toolbar-sisef
The problem stems from the handleDropdownChange method in TableFilter.js:
It treats an empty string as well as the "All" keyword as the same, and then passes an empty string to the onFilterUpdate method (filterUpdate in MUIDataTable.js). filterUpdate hits the "default" in the switch statement for dropdowns and removes the filters on an empty string:
Expected Behavior
Empty strings should be valid filter options.
Current Behavior
Empty strings, as well as the All keyword, are treated the same.
Steps to Reproduce (for bugs)
Your Environment