Add enum_is_nullish_or operator
Summary: Doc: https://docs.google.com/document/d/1miofxds9DJgWScj0zFyBbdpRH5Rj0T9FqiCapof5-vU/edit#heading=h.pg8svtdjlx7 Reviewed By: antonk52 Differential Revision: D49410975 fbshipit-source-id: 5f97e055107dfb72d14825b5d697cea71b9bf81a
This commit is contained in:
committed by
Facebook GitHub Bot
parent
e6f1e7a74f
commit
6f38ecfd01
@@ -106,6 +106,12 @@ export const dataTablePowerSearchOperators = {
|
||||
valueType: 'ENUM',
|
||||
enumLabels,
|
||||
}),
|
||||
enum_is_nullish_or: (enumLabels: Record<string, string>) => ({
|
||||
label: 'is nullish or',
|
||||
key: 'enum_is_nullish_or',
|
||||
valueType: 'ENUM',
|
||||
enumLabels,
|
||||
}),
|
||||
enum_is_not: (enumLabels: Record<string, string>) => ({
|
||||
label: 'is not',
|
||||
key: 'enum_is_not',
|
||||
@@ -224,6 +230,8 @@ export const dataTablePowerSearchOperatorProcessorConfig = {
|
||||
value <= searchValue,
|
||||
enum_is: (_operator, searchValue: string, value: string) =>
|
||||
searchValue === value,
|
||||
enum_is_nullish_or: (_operator, searchValue: string, value?: string | null) =>
|
||||
value == null || searchValue === value,
|
||||
enum_is_not: (_operator, searchValue: string, value: string) =>
|
||||
searchValue !== value,
|
||||
enum_set_is_nullish_or_any_of: (
|
||||
|
||||
Reference in New Issue
Block a user