eschutho commented on code in PR #27593:
URL: https://github.com/apache/superset/pull/27593#discussion_r1532917374


##########
superset-frontend/src/dashboard/components/menu/HoverMenu.tsx:
##########
@@ -81,6 +82,8 @@ export default class HoverMenu extends 
React.PureComponent<HoverMenuProps> {
             position === 'left' && 'hover-menu--left',
             position === 'top' && 'hover-menu--top',
           )}
+          onMouseEnter={onHover}
+          onMouseLeave={onHover}

Review Comment:
   Technically this component knows the state of the hover. OnMouseEnter = 
hovered onMouseLeave = not hovered. Instead of having the parent storing and 
toggling the state (which could get out of sync), I think we can be more 
explicit by letting this HoverMenu component save the state of the hover, and 
then there's already a ref getting passed in. We should be able to use that ref 
to get the state of the hover instead of having the onHover callback. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to