Has anyone managed to create a `Popup` on Compose ...
# compose-desktop
s
Has anyone managed to create a
Popup
on Compose for desktop that works like a
Dialog
on Compose for Android? I'm missing two features: shading the content behind the
Popup
and clicking on that content dismissing it without also having clicking on the
Popup
itself causing it to be dismissed.
androidx.compose.material.AlertDialog
doesn't do either of these.
Ok, making the scrim darkened was simple. That should probably be added for
AlertDialog
. Is there a way to have a
Box
block gestures from passing through to its parent?
I found a solution to clicking on the popup closing it. Adding a
Box
around the content with a
Modifier.onClick {}
intercepts the click.
d
Yes, it's a good solution to create transparent Box with onClick modifier.
189 Views