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
In nested popovers with ListView, closing nested popover from ListViewonSelectionChange causes both popovers to close
🤔 Expected Behavior
Only the 2nd popover should close
😯 Current Behavior
It appears as though closing the popover from onSelectionChange does not stop the Overlay's onInteractionOutside from firing. But since the popover closed, the next available popover to check is the original (non-closing) popover. This means that both popovers end up closing.
Weirdly enough, if you click the ListVIewItem's checkbox, the behavior does not exhibit. You have to click the label.
💁 Possible Solution
n/a
🔦 Context
While opening popovers from popovers may be advised against. It does (and will) happen. This issue was mitigated by adding a 0-length timeout before the close method to get the close after the onInteractionOutside method.
Could you perhaps not close on selection change? That happens on pointer down. Usually, actions in modals are taken on pointer up. For example, clicking a menu item.
You could attach an onPointerUp to the document after a selection change? Or you could add a close/confirm button.
That feels pretty clunky to keep track of. An action on selection (which is a UX requirement rather than a button) is going to be far more common than doing the selection, keeping track of if one just occurred, and then determining if it should close based on if a selection was made, and then doing the action after that.
🐛 Bug Report
In nested popovers with
ListView
, closing nested popover fromListView
onSelectionChange
causes both popovers to close🤔 Expected Behavior
Only the 2nd popover should close
😯 Current Behavior
It appears as though closing the popover from
onSelectionChange
does not stop theOverlay
'sonInteractionOutside
from firing. But since the popover closed, the next available popover to check is the original (non-closing) popover. This means that both popovers end up closing.Weirdly enough, if you click the
ListVIew
Item
's checkbox, the behavior does not exhibit. You have to click the label.💁 Possible Solution
n/a
🔦 Context
While opening popovers from popovers may be advised against. It does (and will) happen. This issue was mitigated by adding a 0-length timeout before the close method to get the close after the
onInteractionOutside
method.i.e.
💻 Code Sample
Code sandbox example
🌍 Your Environment
🧢 Your Company/Team
Adobe Analytics (Workspace Analysis)
The text was updated successfully, but these errors were encountered: