Skip to content

Commit

Permalink
fix: removing filter with more than one colon
Browse files Browse the repository at this point in the history
Closes #376
  • Loading branch information
anajalvarenga committed Oct 14, 2024
1 parent fa2738b commit 3588a25
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dashboard/src/pages/TreeDetails/TreeDetailsFilterList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ const TreeDetailsFilterList = ({

const onClickItem = useCallback(
(flatValue: string, _: number) => {
const [field, value] = flatValue.split(':');
const [field, ...rest] = flatValue.split(':');
const value = rest.join(':');

const newFilter = JSON.parse(JSON.stringify(filter ?? {}));
const fieldSection = newFilter[field as TFilterKeys];
Expand Down

0 comments on commit 3588a25

Please sign in to comment.