Since there's not a compose exposed dropdown menu yet I built one myself (there's a WIP patch somewhere, but it uses a lot of compose internals so it's hard to copy). I'm happy with how it looks, but not with the complexity of the code. Is there a way to avoid needing subcomposeLayout but get the same result? Thanks!
https://gist.github.com/danielzfranklin/a54260971aa51b2e2c4140c741f7650b
c
Colton Idle
05/30/2021, 2:01 AM
I will be sure to use this 😄
Exposed dropdown is one of my biggest wants from compose material lib.
Thanks for introducing me to Popup @Zach Klippenstein (he/him) [MOD]. Per the docs DropdownMenu should behave similarly when it comes to layout. The reason I'm using SCL is to have the popup be the exact same width as the field. If I do nothing and just render both the width of the popup matches the width of the text, if I set the popup to Modifier.fillMaxSize it's about 20% bigger than the Box holding it and the field.
z
Zach Klippenstein (he/him) [MOD]
05/30/2021, 8:56 PM
Might be worth filing a feature request for that
👍 1
d
Daniel
05/30/2021, 10:11 PM
Once they build an official one this'll be a pretty esoteric use case. And I'm 0/3 on feature requests people suggested I make here, so I don't think I'll bother.