fix: default category

This commit is contained in:
jialin
2025-01-03 20:51:22 +08:00
parent 2a4ebcaf9c
commit 1d66becff5
4 changed files with 5 additions and 4 deletions
@@ -128,7 +128,7 @@ const AddModal: React.FC<AddModalProps> = (props) => {
selectSpecRef.current = spec;
return {
..._.omit(spec, ['name']),
categories: _.get(spec, 'categories.0', null)
categories: _.get(current, 'categories.0', null)
};
};
@@ -136,7 +136,7 @@ const AddModal: React.FC<AddModalProps> = (props) => {
selectSpecRef.current = data;
form.current?.setFieldsValue({
..._.omit(data, ['name']),
categories: _.get(data, 'categories.0', null)
categories: _.get(current, 'categories.0', null)
});
};