Add int_less_or_equal operator

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

Reviewed By: lblasa, antonk52

Differential Revision: D49230140

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

View File

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