From 113e2a90ada84c172f658eb8d456f38661346022 Mon Sep 17 00:00:00 2001 From: Andrey Goncharov Date: Thu, 14 Sep 2023 04:48:12 -0700 Subject: [PATCH] Add string_matches_exactly operator Summary: Doc: https://docs.google.com/document/d/1miofxds9DJgWScj0zFyBbdpRH5Rj0T9FqiCapof5-vU/edit#heading=h.pg8svtdjlx7 Reviewed By: lblasa Differential Revision: D49230149 fbshipit-source-id: 7d66733d0ff311a82f9bc5673a2fb204d3ae6a9a --- .../ui/data-table/DataTableDefaultPowerSearchOperators.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/desktop/flipper-plugin/src/ui/data-table/DataTableDefaultPowerSearchOperators.tsx b/desktop/flipper-plugin/src/ui/data-table/DataTableDefaultPowerSearchOperators.tsx index 75b2b9590..ab3eab5f4 100644 --- a/desktop/flipper-plugin/src/ui/data-table/DataTableDefaultPowerSearchOperators.tsx +++ b/desktop/flipper-plugin/src/ui/data-table/DataTableDefaultPowerSearchOperators.tsx @@ -26,6 +26,11 @@ export const dataTablePowerSearchOperators = { key: 'string_not_contains', valueType: 'STRING', }), + string_matches_exactly: () => ({ + label: 'is', + key: 'string_matches_exactly', + valueType: 'STRING', + }), } satisfies { [key: string]: (...args: any[]) => OperatorConfig; }; @@ -43,4 +48,6 @@ export const dataTablePowerSearchOperatorProcessorConfig = { !(value as string) .toLowerCase() .includes((searchValue as string).toLowerCase()), + string_matches_exactly: (operator, searchValue, value) => + value === searchValue, } satisfies PowerSearchOperatorProcessorConfig;