Skip to content

Commit ab6d44c

Browse files
(verified) onhover feature works for React apps
1 parent 38b6aa0 commit ab6d44c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/app/components/PerformanceVisx.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ const getPerfMetrics = (snapshots, snapshotsIds):any[] => {
112112
/* EXPORT COMPONENT */
113113
const PerformanceVisx = (props: BarStackProps) => {
114114

115+
// hook used to dispatch onhover action in rect
115116
const [{ tabs, currentTab }, dispatch] = useStoreContext();
116117

117118
const { width, height, snapshots, hierarchy } = props;
@@ -219,7 +220,7 @@ const PerformanceVisx = (props: BarStackProps) => {
219220
/* TIP TOOL EVENT HANDLERS */
220221
// Hides tool tip once cursor moves off the current rect
221222
onMouseLeave={() => {
222-
// dispatch(onHoverExit(allComponentRtids[bar.key])
223+
dispatch(onHoverExit(allComponentRtids[bar.key])
223224
tooltipTimeout = window.setTimeout(() => {
224225
hideTooltip();
225226
}, 300);

0 commit comments

Comments
 (0)