I have made use of lazyColumn to display a list of...
# compose
r
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
You can create the drop-down inside the lazy column, set focusable to true and use the dismissed handler.
r
@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
Implement the position provider and give it to the drop-down.
I think there's an existing one that does what you want but I can't check at work rn.
r
Thanks again @Dominaezzz for helping me out. It’s working now.