品类准入 树重置问题
This commit is contained in:
@ -205,6 +205,8 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi
|
||||
useEffect(() => {
|
||||
if (visible) {
|
||||
setTreeLoading(true);
|
||||
setCheckedKeys([]);
|
||||
setDisabledCategories([]);
|
||||
categoryTree().then((res) => {
|
||||
const { code, data } = res;
|
||||
if (code == 200) {
|
||||
@ -223,6 +225,7 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi
|
||||
onCancel={() => {
|
||||
form.resetFields();
|
||||
setCheckedKeys([]);
|
||||
setDisabledCategories([]);
|
||||
onCancel();
|
||||
}}
|
||||
width="700px"
|
||||
@ -307,6 +310,7 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi
|
||||
onClick={() => {
|
||||
form.resetFields();
|
||||
setCheckedKeys([]);
|
||||
setDisabledCategories([]);
|
||||
}}
|
||||
>
|
||||
重置
|
||||
|
Reference in New Issue
Block a user