Commit 2849f097 by zhaochengxiang

bug fix

parent a9707f53
...@@ -747,7 +747,7 @@ const ModelTree = (props) => { ...@@ -747,7 +747,7 @@ const ModelTree = (props) => {
/> : <UpdateBranch /> : <UpdateBranch
visible={visible} visible={visible}
type={type} type={type}
item={(type==='add')?item:currentRightClickDir} item={(type==='add')?null:currentRightClickDir}
onCancel={(val) => { onCancel={(val) => {
setVisible(false) setVisible(false)
if (val) { if (val) {
......
...@@ -185,14 +185,14 @@ const Basic = React.forwardRef(function ({ type, item, user }, ref) { ...@@ -185,14 +185,14 @@ const Basic = React.forwardRef(function ({ type, item, user }, ref) {
}, []) }, [])
React.useEffect(() => { React.useEffect(() => {
if (item) { if (item && type === 'update') {
form?.setFieldsValue({ form?.setFieldsValue({
...item, ...item,
admins: (item?.easyDataModelerMemberShip?.easyDataModelerMembers??[]).filter(item => item.admin), admins: (item?.easyDataModelerMemberShip?.easyDataModelerMembers??[]).filter(item => item.admin),
members: (item?.easyDataModelerMemberShip?.easyDataModelerMembers??[]).filter(item => !item.admin), members: (item?.easyDataModelerMemberShip?.easyDataModelerMembers??[]).filter(item => !item.admin),
}) })
} }
}, [item]) }, [item, type])
const marginBottom = React.useMemo(() => { const marginBottom = React.useMemo(() => {
return (type==='update' && !item?.editable) ? 5 : 15 return (type==='update' && !item?.editable) ? 5 : 15
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment