Semantic-Org/Semantic-UI-React
Vedi su GitHubRework TransitionablePortal callbacks for consistency
Open
#2423 aperta il 10 gen 2018
bughelp wanted
Metriche repository
- Star
- (13.136 star)
- Metriche merge PR
- (Nessuna PR mergiata in 30 g)
Descrizione
Steps
- Create a controlled
<TransitionablePortal /> - Toggle the open prop from false to true
- Trigger a close with ESC or click outside
Expected Result
- On prop change to open, the onOpen callback should not be called. This is a programmatic prop change, not a trigger click.
- When a close event is triggered, the onClose callback should be called before starting the transition as the user may choose to disregard the close request.
Actual Result
- On prop change to open, onOpen is called at the beginning and end of the open transition
- When a close event is triggered, the onClose callback is called after the onHide callback. There is no way to handle the close request and ignore it.
See the test case for proposed fixes.
Version
0.77.2