diff --git a/client/src/containers/filter/filter-select/filter-select-values/index.tsx b/client/src/containers/filter/filter-select/filter-select-values/index.tsx index 42453348..6f7d28b8 100644 --- a/client/src/containers/filter/filter-select/filter-select-values/index.tsx +++ b/client/src/containers/filter/filter-select/filter-select-values/index.tsx @@ -55,7 +55,6 @@ const FilterSelectValues: FC = ({ const form = useForm({ defaultValues: { values: defaultValues, operator: "=" }, }); - const selectedValues = form.watch("values"); const [formItems, setFormitems] = useState(allValues); const fuse = (value: string) => { @@ -82,9 +81,15 @@ const FilterSelectValues: FC = ({ const handleSelectAll = (checked: boolean) => { setSelectAll(checked); if (checked) { - form.setValue("values", allValues); + form.setValue("values", allValues, { + shouldDirty: true, + shouldTouch: true, + }); } else { - form.setValue("values", []); + form.setValue("values", [], { + shouldDirty: true, + shouldTouch: true, + }); } }; @@ -177,7 +182,7 @@ const FilterSelectValues: FC = ({