I have made use of lazyColumn to display a list of data and now want to show a popup menu after clicking a triple dot button in individual row just below itself but I want the dropdown to close in case the user presses anywhere outside the dropdown for ex: clicking another row’s button. I see a lot of examples to individually show either lazyColumn or dropdown but none that combines both. Can anyone help out?
d
Dominaezzz
01/21/2022, 2:07 PM
You can create the drop-down inside the lazy column, set focusable to true and use the dismissed handler.
r
Rahul Rawat
01/21/2022, 2:41 PM
@Dominaezzz So I am able to show the dropdown but it’s not showing beneath the popup button. Is there any way to make it do that?
d
Dominaezzz
01/21/2022, 2:52 PM
Implement the position provider and give it to the drop-down.
Dominaezzz
01/21/2022, 2:53 PM
I think there's an existing one that does what you want but I can't check at work rn.
r
Rahul Rawat
01/22/2022, 6:55 AM
Thanks again @Dominaezzz for helping me out. It’s working now.