Add int_less_than operator

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

Reviewed By: lblasa, antonk52

Differential Revision: D49230143

fbshipit-source-id: d1551a9a472bdb9dafe61259e88bb50fa8b79153
This commit is contained in:
Andrey Goncharov
2023-09-14 04:48:12 -07:00
committed by Facebook GitHub Bot
parent 18ae536dc3
commit 8d4c8486e5

View File

@@ -56,6 +56,11 @@ export const dataTablePowerSearchOperators = {
key: 'int_greater_or_equal',
valueType: 'INTEGER',
}),
int_less_than: () => ({
label: '<',
key: 'int_less_than',
valueType: 'INTEGER',
}),
} satisfies {
[key: string]: (...args: any[]) => OperatorConfig;
};
@@ -94,4 +99,6 @@ export const dataTablePowerSearchOperatorProcessorConfig = {
value > searchValue,
int_greater_or_equal: (_operator, searchValue: number, value: number) =>
value >= searchValue,
int_less_than: (_operator, searchValue: number, value: number) =>
value < searchValue,
} satisfies PowerSearchOperatorProcessorConfig;