From af59ea98ca202dac12e816ab0d6b8eb7c24534ca Mon Sep 17 00:00:00 2001 From: islxyqwe Date: Thu, 14 Sep 2023 16:10:51 +0800 Subject: [PATCH] fix: fix filter saving --- .../src/fields/filterField/filterEditDialog.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/graphic-walker/src/fields/filterField/filterEditDialog.tsx b/packages/graphic-walker/src/fields/filterField/filterEditDialog.tsx index ac32c45d..3e4cf0c7 100644 --- a/packages/graphic-walker/src/fields/filterField/filterEditDialog.tsx +++ b/packages/graphic-walker/src/fields/filterField/filterEditDialog.tsx @@ -1,7 +1,7 @@ import { observer } from "mobx-react-lite"; import React from "react"; import { useTranslation } from "react-i18next"; - +import { toJS } from 'mobx'; import Modal from "../../components/modal"; import type { IFilterField, IFilterRule } from "../../interfaces"; import { useGlobalStore } from "../../store"; @@ -45,7 +45,7 @@ const FilterEditDialog: React.FC = observer(() => { React.useEffect(() => { if (field !== ufRef.current) { - setUncontrolledField(field); + setUncontrolledField(toJS(field) ); } }, [field]);