Fix empty filter bug

Summary: Doc: https://docs.google.com/document/d/1miofxds9DJgWScj0zFyBbdpRH5Rj0T9FqiCapof5-vU/edit#heading=h.pg8svtdjlx7

Reviewed By: antonk52

Differential Revision: D49410974

fbshipit-source-id: 4845f32e6be6375e113053b7123df6e78b44b269
This commit is contained in:
Andrey Goncharov
2023-09-19 08:19:25 -07:00
committed by Facebook GitHub Bot
parent e5b2f693a3
commit ba812eaea6

View File

@@ -469,7 +469,7 @@ export function computeDataTableFilter(
powerSearchProcessors: PowerSearchOperatorProcessorConfig,
) {
return function dataTableFilter(item: any) {
if (!searchExpression) {
if (!searchExpression || !searchExpression.length) {
return true;
}
return searchExpression.some((searchTerm) => {