You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’ve verified that calling close does resolve the Promise.
However, when isOpen isn’t managed inside the OverlayControllerComponent, a typical pattern would be to control the overlay by calling only unmount, without invoking close. In that scenario, I’m concerned that openAsync might never resolve, which could lead to unexpected behavior. Is it intentional that the Promise can be resolved only by calling close? If so, is the recommended best practice to always call close before invoking unmount?
If the current behavior isn’t intentional, I’d like to suggest two possible approaches:
Option 1.
Resolve the openAsync Promise when unmount is called.
Option 2.
Have the component mounted by openAsync resolve the Promise in a cleanup routine when it is unmounted.