diff --git a/frontend/app/components/shared/Filters/FilterItem/FilterItem.tsx b/frontend/app/components/shared/Filters/FilterItem/FilterItem.tsx index 46ce146f2..dceb4513b 100644 --- a/frontend/app/components/shared/Filters/FilterItem/FilterItem.tsx +++ b/frontend/app/components/shared/Filters/FilterItem/FilterItem.tsx @@ -7,6 +7,7 @@ import FilterSource from '../FilterSource'; import { FilterKey, FilterType } from 'App/types/filter/filterType'; import SubFilterItem from '../SubFilterItem'; import { CircleMinus } from 'lucide-react'; +import cn from 'classnames' interface Props { filterIndex?: number; @@ -67,6 +68,7 @@ function FilterItem(props: Props) { }); }; + const isReversed = filter.key === FilterKey.TAGGED_ELEMENT return (
@@ -85,49 +87,51 @@ function FilterItem(props: Props) { disabled={disableDelete || props.readonly} /> - {/* Filter with Source */} - {filter.hasSource && ( - <> - - - - )} +
+ {/* Filter with Source */} + {filter.hasSource && ( + <> + + + + )} - {/* Filter values */} - {!isSubFilter && filter.operatorOptions && ( - <> - - {canShowValues && ( - <> - {props.readonly ? ( -
- {filter.value.map((val: string) => { - return filter.options && filter.options.length - ? filter.options[filter.options.findIndex((i: any) => i.value === val)]?.label ?? val - : val - }).join(', ')} -
- ) : ( - - )} - - )} - - )} + {/* Filter values */} + {!isSubFilter && filter.operatorOptions && ( + <> + + {canShowValues && ( + <> + {props.readonly ? ( +
+ {filter.value.map((val: string) => { + return filter.options && filter.options.length + ? filter.options[filter.options.findIndex((i: any) => i.value === val)]?.label ?? val + : val + }).join(', ')} +
+ ) : ( + + )} + + )} + + )} +
{/* filters */} {isSubFilter && (