yew-hooks icon indicating copy to clipboard operation
yew-hooks copied to clipboard

Allow using multiple nodes with use_click_away

Open ctron opened this issue 2 years ago • 1 comments

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.

ctron avatar Jul 24 '23 06:07 ctron

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

jetli avatar Jul 25 '23 10:07 jetli