Add float_less_than operator

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

Reviewed By: antonk52

Differential Revision: D49230142

fbshipit-source-id: b49af428d75f749142f2aa87c8b863c379f53c27
This commit is contained in:
Andrey Goncharov
2023-09-14 04:48:12 -07:00
committed by Facebook GitHub Bot
parent 70a46ddcc6
commit db60ec0fa1

View File

@@ -76,6 +76,11 @@ export const dataTablePowerSearchOperators = {
key: 'float_greater_or_equal',
valueType: 'FLOAT',
}),
float_less_than: () => ({
label: '<',
key: 'float_less_than',
valueType: 'FLOAT',
}),
} satisfies {
[key: string]: (...args: any[]) => OperatorConfig;
};
@@ -122,4 +127,6 @@ export const dataTablePowerSearchOperatorProcessorConfig = {
value > searchValue,
float_greater_or_equal: (_operator, searchValue: number, value: number) =>
value >= searchValue,
float_less_than: (_operator, searchValue: number, value: number) =>
value < searchValue,
} satisfies PowerSearchOperatorProcessorConfig;