From 2dbe2c8b830a3b006b1536c7dac48b5f8c24e00d Mon Sep 17 00:00:00 2001 From: zjj <3272660260@qq.com> Date: 星期一, 28 四月 2025 16:53:07 +0800 Subject: [PATCH] #wms端生成任务优化 --- rsf-admin/src/page/components/TreeSelectInput.jsx | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rsf-admin/src/page/components/TreeSelectInput.jsx b/rsf-admin/src/page/components/TreeSelectInput.jsx index 2c51cc5..fb5de88 100644 --- a/rsf-admin/src/page/components/TreeSelectInput.jsx +++ b/rsf-admin/src/page/components/TreeSelectInput.jsx @@ -7,7 +7,7 @@ const TreeSelectInput = ({ resource, required, onChange, label, source = 'parentId', value, isTranslate = false, ...rest }) => { const translate = useTranslate(); - const { setValue } = useFormContext(); + const form = useFormContext(); const [filter, setFilter] = React.useState(""); const [treeData, setTreeData] = React.useState([]); @@ -34,7 +34,7 @@ const handleChange = (event) => { const val = event.target.value; setProxyVal(val); - setValue(source, val, { + form?.setValue(source, val, { shouldValidate: true, shouldDirty: true, }); -- Gitblit v1.9.1