Propagate settings in the tree

This commit is contained in:
Thomas Nordquist
2019-07-11 17:14:43 +02:00
parent 167f0b39e0
commit 175aeea468
2 changed files with 4 additions and 4 deletions

View File

@@ -63,7 +63,7 @@ function TreeNodeSubnodes(props: Props) {
}) })
return <span className={props.classes.list}>{listItems}</span> return <span className={props.classes.list}>{listItems}</span>
}, [alreadyAdded, props.treeNode.lastUpdate, props.theme]) }, [alreadyAdded, props.treeNode.lastUpdate, props.theme, props.settings])
} }
const styles = (theme: Theme) => ({ const styles = (theme: Theme) => ({

View File

@@ -11,7 +11,7 @@ import { useAnimationToIndicateTopicUpdate } from './effects/useAnimationToIndic
import { useDeleteKeyCallback } from './effects/useDeleteKeyCallback' import { useDeleteKeyCallback } from './effects/useDeleteKeyCallback'
import { useIsAllowedToAutoExpandState } from './effects/useIsAllowedToAutoExpandState' import { useIsAllowedToAutoExpandState } from './effects/useIsAllowedToAutoExpandState'
import { useViewModelSubscriptions } from './effects/useViewModelSubscriptions' import { useViewModelSubscriptions } from './effects/useViewModelSubscriptions'
import { useSelectionState } from './useSelectionState' import { useSelectionState } from './effects/useSelectionState'
export interface Props { export interface Props {
isRoot?: boolean isRoot?: boolean
@@ -86,7 +86,7 @@ function TreeNodeComponent(props: Props) {
didSelectTopic() didSelectTopic()
} }
}, },
[didSelectTopic] [didSelectTopic, settings]
) )
useEffect(() => { useEffect(() => {
@@ -134,7 +134,7 @@ function TreeNodeComponent(props: Props) {
{renderNodes()} {renderNodes()}
</div> </div>
) )
}, [treeNode.lastUpdate, treeNode, name, isCollapsed, selected, theme]) }, [treeNode.lastUpdate, treeNode, name, isCollapsed, selected, theme, mouseOver, settings])
} }
class TreeNodeComponentFasterReconciliationWrapper extends React.PureComponent<Props, {}> { class TreeNodeComponentFasterReconciliationWrapper extends React.PureComponent<Props, {}> {