From 8a591a7855c097f69247eae2914941e90e3c2265 Mon Sep 17 00:00:00 2001 From: Andrey Goncharov Date: Mon, 2 Oct 2023 08:27:37 -0700 Subject: [PATCH] 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 --- .../DataTableDefaultPowerSearchOperators.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/desktop/flipper-plugin/src/ui/data-table/DataTableDefaultPowerSearchOperators.tsx b/desktop/flipper-plugin/src/ui/data-table/DataTableDefaultPowerSearchOperators.tsx index 1cc327341..2e38e4091 100644 --- a/desktop/flipper-plugin/src/ui/data-table/DataTableDefaultPowerSearchOperators.tsx +++ b/desktop/flipper-plugin/src/ui/data-table/DataTableDefaultPowerSearchOperators.tsx @@ -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',