Add string_contains operator

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

Reviewed By: lblasa

Differential Revision: D49226934

fbshipit-source-id: 12d43334e87b0fb502173143d5a19a48cd2fc9ee
This commit is contained in:
Andrey Goncharov
2023-09-14 04:48:12 -07:00
committed by Facebook GitHub Bot
parent 589937bc8f
commit ceac388eed
2 changed files with 23 additions and 9 deletions

View File

@@ -494,7 +494,10 @@ export function computeDataTableFilter(
return true;
}
const processor = powerSearchProcessors[searchTerm.operator.key];
const processor =
powerSearchProcessors[
searchTerm.operator.key as keyof typeof powerSearchProcessors
];
if (!processor) {
console.warn(
'computeDataTableFilter -> processor at searchTerm.operator.key is not recognized',
@@ -504,7 +507,7 @@ export function computeDataTableFilter(
return true;
}
return processor(searchTerm.operator, value);
return processor(searchTerm.operator, searchTerm.searchValue, value);
});
};
}