Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[invokers] Reference the parent popover/dialog #1148

Open
o-t-w opened this issue Feb 2, 2025 · 0 comments
Open

[invokers] Reference the parent popover/dialog #1148

o-t-w opened this issue Feb 2, 2025 · 0 comments

Comments

@o-t-w
Copy link

o-t-w commented Feb 2, 2025

For certain UI components, like a large nested menu, for example, many buttons, each with a command and commandfor might be used.

https://codepen.io/cssgrid/pen/raBbMPL

If I try to reuse a component on the same page by copy/pasteing some HTML, needing to look through the markup and update every id and commandfor is somewhat laborious and error-prone. Both the "close" and "hide-popover" commands will very often be used to close the parent popover/dialog that the button is nested within.

It might be useful to be able to refer to the nearest ancestor popover/dialog element, rather than only being able to specify an id, which needs to be unique every time.

Something like commandfor="parent" or commandfor="nearest".

Needing to reference a unique id makes reuse awkward.

@o-t-w o-t-w changed the title [invokers] Reference parent? [invokers] Reference the parent popover/dialog Feb 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant