Commit 2849f097 by zhaochengxiang

bug fix

parent a9707f53
......@@ -747,7 +747,7 @@ const ModelTree = (props) => {
/> : <UpdateBranch
visible={visible}
type={type}
item={(type==='add')?item:currentRightClickDir}
item={(type==='add')?null:currentRightClickDir}
onCancel={(val) => {
setVisible(false)
if (val) {
......
......@@ -185,14 +185,14 @@ const Basic = React.forwardRef(function ({ type, item, user }, ref) {
}, [])
React.useEffect(() => {
if (item) {
if (item && type === 'update') {
form?.setFieldsValue({
...item,
admins: (item?.easyDataModelerMemberShip?.easyDataModelerMembers??[]).filter(item => item.admin),
members: (item?.easyDataModelerMemberShip?.easyDataModelerMembers??[]).filter(item => !item.admin),
})
}
}, [item])
}, [item, type])
const marginBottom = React.useMemo(() => {
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