Semantic-ui-react: Popup - allow mouseEnter, mouseLeave delay to be set via props

Created on 15 Jan 2017  路  6Comments  路  Source: Semantic-Org/Semantic-UI-React

Currently mouseEnter and mouseLeave delay values are hard-coded.
https://github.com/Semantic-Org/Semantic-UI-React/blob/master/src/modules/Popup/Popup.js#L264

It would be great if these could be set via popup props.

bug good first issue help wanted

Most helpful comment

I've revamped a lot of Portal and Popup logic. Confirming it was fixed in the latest release.

http://g.recordit.co/tybYxhNGmo.gif

Closing this issue as we have #1169 for documenting missing props and behaviors.

All 6 comments

This is actually a bug. All portal props (i.e. mouseEnterDelay, etc.) can be added to a Popup and it _should_ pass them through to the underlying Portal:

https://github.com/Semantic-Org/Semantic-UI-React/blob/master/src/modules/Popup/Popup.js#L346

However, when I try this in the doc site editor, I cannot get it to work. It seems the value is always overridden somehow.

Fix

Currently, there is no visibility of this in the docs nor typings. We should instead explicitly add all the portal props to the Popup's propTypes and typings. Doing this will also change how the props are built-up and consumed. This may in fact also resolve the bug.

@levithomason this still open? i'd like to help out if so, with more info and knowledge of how to reproduce it!

I, unfortunately, don't have the bandwidth for a walkthrough, however, you can check out #1169 for more info on what needs to happen here. I will be glad to offer PR review comments regarding what is missing or needs done, I just can't promise that I'll be able to also help craft the solutions.

This seems to be fixed in 0.66.0 but it's not documented. Works for me with mouseLeaveDelay and mouseEnterDelay props.

I've revamped a lot of Portal and Popup logic. Confirming it was fixed in the latest release.

http://g.recordit.co/tybYxhNGmo.gif

Closing this issue as we have #1169 for documenting missing props and behaviors.

@levithomason I tried this today and, while it seems to work (behaves like your GIF above), the Popup is still triggered by a _click_ event, even if setting on="hover".

znybz6ew6x

(Note that mouseEnterDelay is set to 10s).


EDIT: Created #2583.

Was this page helpful?
0 / 5 - 0 ratings