diff --git a/desktop/flipper-plugin/src/ui/PowerSearch/PowerSearchConfig.tsx b/desktop/flipper-plugin/src/ui/PowerSearch/PowerSearchConfig.tsx index dcbc89016..37208870f 100644 --- a/desktop/flipper-plugin/src/ui/PowerSearch/PowerSearchConfig.tsx +++ b/desktop/flipper-plugin/src/ui/PowerSearch/PowerSearchConfig.tsx @@ -9,7 +9,12 @@ // Mostly matches https://www.internalfb.com/code/www/html/intern/js/ui/PowerSearch/PowerSearchExampleConfig.js -export type SimpleFilterValueType = 'NO_VALUE' | 'INTEGER' | 'FLOAT' | 'STRING'; +export type SimpleFilterValueType = + | 'NO_VALUE' + | 'INTEGER' + | 'FLOAT' + | 'STRING' + | 'STRING_SET'; export type EnumFilterValueType = 'ENUM' | 'ENUM_SET'; diff --git a/desktop/flipper-plugin/src/ui/PowerSearch/PowerSearchExampleConfig.tsx b/desktop/flipper-plugin/src/ui/PowerSearch/PowerSearchExampleConfig.tsx index ad0ac53cd..3eb058e73 100644 --- a/desktop/flipper-plugin/src/ui/PowerSearch/PowerSearchExampleConfig.tsx +++ b/desktop/flipper-plugin/src/ui/PowerSearch/PowerSearchExampleConfig.tsx @@ -26,6 +26,11 @@ const operators = { key: 'not_contain', valueType: 'STRING', }, + contains_any_of: { + label: 'contains any of', + key: 'contains_any_of', + valueType: 'STRING_SET', + }, greater_than: { label: '>', key: 'greater_than', @@ -115,6 +120,7 @@ export const powerSearchExampleConfig: PowerSearchConfig = { operators: { contain: operators.contain, not_contain: operators.not_contain, + contains_any_of: operators.contains_any_of, }, }, placeholder: { diff --git a/desktop/flipper-plugin/src/ui/PowerSearch/PowerSearchStringSetTerm.tsx b/desktop/flipper-plugin/src/ui/PowerSearch/PowerSearchStringSetTerm.tsx new file mode 100644 index 000000000..a45c5036f --- /dev/null +++ b/desktop/flipper-plugin/src/ui/PowerSearch/PowerSearchStringSetTerm.tsx @@ -0,0 +1,51 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + */ + +import {Select} from 'antd'; +import React from 'react'; + +type PowerSearchStringSetTermProps = { + onCancel: () => void; + onChange: (value: string[]) => void; +}; + +export const PowerSearchStringSetTerm: React.FC< + PowerSearchStringSetTermProps +> = ({onCancel, onChange}) => { + const selectValueRef = React.useRef(); + + return ( +