https://kotlinlang.org logo
Title
b

Big Chungus

02/15/2021, 5:56 PM
Hmm, Modifier.clickable() doesn;t seem to work on TextField
TextField(
      value = value,
      onValueChange = {},
      readOnly = true,
      modifier = Modifier.clickable(role = Role.Button, onClick = {
        expanded = !expanded
      }),
      trailingIcon = {
        Icon(
          imageVector = if (expanded) Icons.Default.KeyboardArrowUp else Icons.Default.KeyboardArrowDown,
          contentDescription = "Localized description")
      }
    )
Am I doing something wrong?
g

gbaldeck

02/15/2021, 6:18 PM
You can cover it with a box of the same height and width then make it clickable. Take a look at the link I sent for the Dropdownbox example. There's a couple places where I'm doing it there.
b

Big Chungus

02/15/2021, 6:24 PM
Yeah, that worked