Refactor sidebar
This commit is contained in:
@@ -63,7 +63,7 @@ function TreeNodeSubnodes(props: Props) {
|
||||
})
|
||||
|
||||
return <span className={props.classes.list}>{listItems}</span>
|
||||
}, [alreadyAdded, props.lastUpdate, props.theme])
|
||||
}, [alreadyAdded, props.treeNode.lastUpdate, props.theme])
|
||||
}
|
||||
|
||||
const styles = (theme: Theme) => ({
|
||||
|
||||
@@ -133,7 +133,7 @@ function TreeNodeComponent(props: Props) {
|
||||
{renderNodes()}
|
||||
</div>
|
||||
)
|
||||
}, [lastUpdate, treeNode, name, isCollapsed, selected, theme])
|
||||
}, [treeNode.lastUpdate, treeNode, name, isCollapsed, selected, theme])
|
||||
}
|
||||
|
||||
export default withStyles(styles, { withTheme: true })(TreeNodeComponent)
|
||||
|
||||
@@ -99,8 +99,8 @@ class TreeComponent extends React.PureComponent<Props, State> {
|
||||
this.updateTimer = undefined
|
||||
this.renderTime = performance.now()
|
||||
|
||||
if (!this.props.paused) {
|
||||
this.props.tree && this.props.tree.applyUnmergedChanges()
|
||||
if (!this.props.paused && this.props.tree) {
|
||||
this.props.tree.applyUnmergedChanges()
|
||||
}
|
||||
window.requestIdleCallback(
|
||||
() => {
|
||||
|
||||
Reference in New Issue
Block a user