mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-13 20:36:34 +00:00
fix(plugin-outline): fix the unsynchronized display of the outline tree during history undo
This commit is contained in:
parent
bd85ca3ca6
commit
4eb80d446e
@ -27,6 +27,11 @@ export function OutlinePaneContext(props: {
|
|||||||
});
|
});
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
return props.pluginContext?.project?.currentDocument?.history.onChangeCursor(() => {
|
||||||
|
setMasterPaneController(new PaneController(props.paneName || MasterPaneName, treeMaster));
|
||||||
|
});
|
||||||
|
}, [treeMaster]);
|
||||||
return (
|
return (
|
||||||
<Pane
|
<Pane
|
||||||
treeMaster={treeMaster}
|
treeMaster={treeMaster}
|
||||||
@ -77,6 +82,8 @@ export const OutlinePlugin = (ctx: IPublicModelPluginContext, options: any) => {
|
|||||||
treeTitleExtra: config.get('treeTitleExtra'),
|
treeTitleExtra: config.get('treeTitleExtra'),
|
||||||
treeMaster,
|
treeMaster,
|
||||||
paneName: MasterPaneName,
|
paneName: MasterPaneName,
|
||||||
|
pluginContext: ctx,
|
||||||
|
options,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -91,6 +98,8 @@ export const OutlinePlugin = (ctx: IPublicModelPluginContext, options: any) => {
|
|||||||
contentProps: {
|
contentProps: {
|
||||||
paneName: BackupPaneName,
|
paneName: BackupPaneName,
|
||||||
treeMaster,
|
treeMaster,
|
||||||
|
pluginContext: ctx,
|
||||||
|
options,
|
||||||
},
|
},
|
||||||
index: 1,
|
index: 1,
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user