Hi! How can I add a small dropdown at the beginnin...
# compose
r
Hi! How can I add a small dropdown at the beginning of the text field so that they look combined as one field? This is something similar that I would like to achieve.
K 1
c
You have a lot of freedom to make something like that if you used
OutlinedTextField
or
BasicTextField
(I think). You could pop your dropdown and your non-material textfield into a
Row
and you'll be there I think
s
TextField also has a
leadingIcon
slot to put some composable before your text will be rendered. It should be the place to try to start with, and if it won’t fit your requirements regarding paddings around it and so on (it most likely won’t), just copy the TextField code from material library, and do the same thing as they do, which is wrap the BasicTextField but put your own stuff on top of it.
r
Thank You, guys! Will take a look.