feat(ui) - filters issue - operator dropdown refresh
This commit is contained in:
parent
0c45d43bb9
commit
05990478c5
2 changed files with 2 additions and 3 deletions
|
|
@ -61,7 +61,7 @@ const dropdownStyles = {
|
|||
}
|
||||
}
|
||||
interface Props {
|
||||
onChange: (e, { name, value }) => void;
|
||||
onChange: (e: any, { name, value }: any) => void;
|
||||
className?: string;
|
||||
options?: any;
|
||||
value?: string;
|
||||
|
|
@ -78,7 +78,7 @@ function FilterOperator(props: Props) {
|
|||
styles={dropdownStyles}
|
||||
placeholder="Select"
|
||||
isDisabled={isDisabled}
|
||||
defaultValue={ value }
|
||||
value={value ? options.find((i: any) => i.value === value) : null}
|
||||
onChange={({ value }: any) => onChange(null, { name: 'operator', value })}
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import { capitalize } from 'App/utils';
|
|||
const countryOptions = Object.keys(countries).map(i => ({ label: countries[i], value: i }));
|
||||
const containsFilters = [{ key: 'contains', label: 'contains', text: 'contains', value: 'contains' }]
|
||||
|
||||
// export const metaFilter = { key: FilterKey.METADATA, type: FilterType.MULTIPLE, category: FilterCategory.METADATA, label: 'Metadata', operator: 'is', operatorOptions: filterOptions.stringOperators, icon: 'filters/metadata' };
|
||||
export const filters = [
|
||||
{ key: FilterKey.CLICK, type: FilterType.MULTIPLE, category: FilterCategory.INTERACTIONS, label: 'Click', operator: 'on', operatorOptions: filterOptions.targetOperators, icon: 'filters/click', isEvent: true },
|
||||
{ key: FilterKey.INPUT, type: FilterType.MULTIPLE, category: FilterCategory.INTERACTIONS, label: 'Input', operator: 'is', operatorOptions: filterOptions.stringOperators, icon: 'filters/input', isEvent: true },
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue