diff --git a/render-process/Properties.tsx b/render-process/Properties.tsx index 62c03ee..42c419d 100644 --- a/render-process/Properties.tsx +++ b/render-process/Properties.tsx @@ -28,6 +28,14 @@ export default class Properties extends Component { treeList: [] }; + curWorkspace: string = ''; + + shouldComponentUpdate(nextProps: PropertiesProps) { + const shouldUpdate = this.curWorkspace != nextProps.workspace; + this.curWorkspace = nextProps.workspace; + return shouldUpdate; + } + componentDidMount() { var workspace = this.props.workspace; if (workspace == '') { @@ -58,6 +66,7 @@ export default class Properties extends Component { } render() { + console.log("render Properties"); const { onOpenTree, workspace } = this.props; const treeList = this.getTreeList(workspace); return (