Support handleUnknownValues in default operators
Summary: We treat every column without the power search config as if it contains strings. Sometimes that might bite us, for instance, when the column contains an object. Reviewed By: lblasa Differential Revision: D49822511 fbshipit-source-id: 18dadb5abe624fae510663fc26668b2b594899c3
This commit is contained in:
committed by
Facebook GitHub Bot
parent
446147b9fe
commit
8a591a7855
@@ -18,25 +18,29 @@ export type PowerSearchOperatorProcessor = (
|
||||
) => boolean;
|
||||
|
||||
export const dataTablePowerSearchOperators = {
|
||||
string_contains: () => ({
|
||||
string_contains: (handleUnknownValues?: boolean) => ({
|
||||
label: 'contains',
|
||||
key: 'string_contains',
|
||||
valueType: 'STRING',
|
||||
handleUnknownValues,
|
||||
}),
|
||||
string_not_contains: () => ({
|
||||
string_not_contains: (handleUnknownValues?: boolean) => ({
|
||||
label: 'does not contain',
|
||||
key: 'string_not_contains',
|
||||
valueType: 'STRING',
|
||||
handleUnknownValues,
|
||||
}),
|
||||
string_matches_exactly: () => ({
|
||||
string_matches_exactly: (handleUnknownValues?: boolean) => ({
|
||||
label: 'is',
|
||||
key: 'string_matches_exactly',
|
||||
valueType: 'STRING',
|
||||
handleUnknownValues,
|
||||
}),
|
||||
string_not_matches_exactly: () => ({
|
||||
string_not_matches_exactly: (handleUnknownValues?: boolean) => ({
|
||||
label: 'is not',
|
||||
key: 'string_not_matches_exactly',
|
||||
valueType: 'STRING',
|
||||
handleUnknownValues,
|
||||
}),
|
||||
string_set_contains_any_of: () => ({
|
||||
label: 'contains any of',
|
||||
|
||||
Reference in New Issue
Block a user