Add enum_set_is_any_of operator
Summary: Doc: https://docs.google.com/document/d/1miofxds9DJgWScj0zFyBbdpRH5Rj0T9FqiCapof5-vU/edit#heading=h.pg8svtdjlx7 Reviewed By: antonk52 Differential Revision: D49230147 fbshipit-source-id: a020d182a36affe65ed9ab3eb6a1197ddd12270b
This commit is contained in:
committed by
Facebook GitHub Bot
parent
61160a2d4b
commit
12179a35da
@@ -93,6 +93,12 @@ export const dataTablePowerSearchOperators = {
|
||||
valueType: 'ENUM',
|
||||
enumLabels,
|
||||
}),
|
||||
enum_set_is_any_of: (enumLabels: Record<string, string>) => ({
|
||||
label: 'is any of',
|
||||
key: 'enum_set_is_any_of',
|
||||
valueType: 'ENUM_SET',
|
||||
enumLabels,
|
||||
}),
|
||||
} satisfies {
|
||||
[key: string]: (...args: any[]) => OperatorConfig;
|
||||
};
|
||||
@@ -145,4 +151,6 @@ export const dataTablePowerSearchOperatorProcessorConfig = {
|
||||
value <= searchValue,
|
||||
enum_is: (_operator, searchValue: string, value: string) =>
|
||||
searchValue === value,
|
||||
enum_set_is_any_of: (_operator, searchValue: string[], value: string) =>
|
||||
searchValue.some((item) => value === item),
|
||||
} satisfies PowerSearchOperatorProcessorConfig;
|
||||
|
||||
Reference in New Issue
Block a user