Can someone help me? I'm having a problem with the...
# compose
k
Can someone help me? I'm having a problem with the width of DropDownMenuItem, it doesn't match the OutlinedTextField width even I set the modifier to .fillMaxWidth. The UI doesn't look good.
s
I could be wrong, but you might be dealing with the fact that both of those two components come from inside m3 so they may have some built-in paddings and whatnot inside that are not editable but don’t really fit your use case. Without looking at the screenshot it’s gonna be hard to know for sure. With that said, I know this https://saket.github.io/cascade/compose/ exists which is like the dropdown but does not impose any default spacings to the children. It might be what you need.
k
@Stylianos Gakis This is what it looks like,
s
Yeah, did you check if that component has a max width set internally?
k
@Stylianos Gakis I'm not sure how, but I set the modifier to fill max width. Sorry I'm really new in development using compose. This is my code.
s
What does exposedDropdownSize do?
k
@Stylianos Gakis I saw it in here, but it is also not working as of testing. https://issuetracker.google.com/issues/205589613
s
They say it's fixed in the alphas. Try to use that to see if their fix works for you too.
k
@Stylianos Gakis is that safe to use? I'm currently using this versions. compose = "1.6.0" compose-compiler = "1.5.4" compose-material3 = "1.2.0-rc01"
s
Looks like the issue mentions
material3:1.3.0-alpha03
as the version that has this fixed. If you want to see if that will work for you, try that one instead.
👍 1