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

Allow using multiple nodes with use_click_away #32

Open
ctron opened this issue Jul 24, 2023 · 1 comment
Open

Allow using multiple nodes with use_click_away #32

ctron opened this issue Jul 24, 2023 · 1 comment

Comments

@ctron
Copy link
Contributor

ctron commented Jul 24, 2023

I am implementing a component consisting of two part: a toggle and some content. The content is shows using a portal.

I do want to use use_click_away, but actually both elements (the toggle and the portal content) should be considered "inside". This works when not using portals by wrapping with an additional element. However, this strategy fails when using portals.

If use_click_away would accept an array of nodes instead, I would be able to define two (or more) nodes as "inside" and it would work.

Let me know if you want me to work on a PR for this.

@jetli
Copy link
Owner

jetli commented Jul 25, 2023

I didn't test for portal usage, I will take a look for portal since portal is common for model dialogs etc.

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

2 participants