Preserve scroll position after exiting focus mode
Summary: Previously we would scroll back to the top of the list Reviewed By: passy, ivanmisuno Differential Revision: D43390481 fbshipit-source-id: ce2d5d57d35b22e87a538720fe2760707a6bc058
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d28748e69f
commit
95ef9bf585
@@ -113,7 +113,7 @@ export function Tree2({nodes, rootId}: {nodes: Map<Id, UINode>; rootId: Id}) {
|
||||
// otherwise we will keep scrolling back to the selected node overriding the users manual scroll offset.
|
||||
// We only should scroll when selection changes
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [selectedNode]);
|
||||
}, [selectedNode, focusedNode]);
|
||||
return (
|
||||
<Layout.ScrollContainer ref={scrollContainerRef}>
|
||||
<HighlightProvider
|
||||
|
||||
Reference in New Issue
Block a user