Skip to content
This repository has been archived by the owner on Nov 22, 2024. It is now read-only.

Commit

Permalink
Preserve scroll position after exiting focus mode
Browse files Browse the repository at this point in the history
Summary: Previously we would scroll back to the top of the list

Reviewed By: passy, ivanmisuno

Differential Revision: D43390481

fbshipit-source-id: ce2d5d57d35b22e87a538720fe2760707a6bc058
  • Loading branch information
Luke De Feo authored and facebook-github-bot committed Feb 17, 2023
1 parent d28748e commit 95ef9bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion desktop/plugins/public/ui-debugger/components/Tree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 95ef9bf

Please sign in to comment.