Add float_less_or_equal operator

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

Reviewed By: lblasa

Differential Revision: D49230133

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

View File

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