Unhover on mouse exit of tree

Summary: This was causing the hover state to linger which is now quite noticable in the tree

Reviewed By: lblasa

Differential Revision: D41548249

fbshipit-source-id: cdf8ed434aa064dba05ebf31773bedaef18ba007
This commit is contained in:
Luke De Feo
2022-11-28 05:09:20 -08:00
committed by Facebook GitHub Bot
parent 6183671a5d
commit a93d571dc0

View File

@@ -58,6 +58,10 @@ export function Tree(props: {
}, [props.selectedNode]); }, [props.selectedNode]);
return ( return (
<div
onMouseLeave={() => {
instance.uiState.hoveredNodes.set([]);
}}>
<HighlightProvider <HighlightProvider
text={searchTerm} text={searchTerm}
highlightColor={theme.searchHighlightBackground.yellow}> highlightColor={theme.searchHighlightBackground.yellow}>
@@ -122,6 +126,7 @@ export function Tree(props: {
/> />
</ControlledTreeEnvironment> </ControlledTreeEnvironment>
</HighlightProvider> </HighlightProvider>
</div>
); );
} }