#Overlaying multiple popups

13 messages · Page 1 of 1 (latest)

robust turret
#

I am trying to overlay multiple popovers and modals, one of my popovers is opened as the result of items in an autocomplete field.
The "request" button then opens a modal. My problem is that when i click on that modal, it closes the popover below it (see the attached photo)

How can I make it so the modal happening on the top doesn't trigger the closing of the popover below ?
I still need it to close when I click outside of it (when there is no request modal present)

#

Sorry if this is a bit hectic.
Basically my question is, how to exclude some element from clickoutside

robust turret
#

I've been trying for a long time but can't figure out how to do it

#

my autocomplete shows buttons that then open the modal. Would I have to pass the requirement down the components tree ?

oak anchor
#

So basically, when you clicked outside of modal, it also closes the popover that opened before right?

oak anchor
#

do you already have the solution for this? @robust turret

robust turret
#

No I did not find a solution

oak anchor
#

it needs to be react 18 though

robust turret
#

I figured that I could potentially pass down the requirements like in the Multiple Nodes example but it would take a lot of variable-passing for my usecase so I was wondering if it was the optimal way to go

#

Ill check it out, thanks