or is there something else to have the touch ripples not be independent depending if you click on the row vs the checkbox.
b
Bryan Herbst
11/04/2021, 7:47 PM
You probably want
Modifier.selectable()
with a
Role.Checkbox
to get proper semantics on the row (or
Modifier.triStateToggleable()
if you support the indeterminate state).
We are also setting
onCheckedChange = null
on the actual
Checkbox
so it isn’t independently clickable
c
Colton Idle
11/04/2021, 11:07 PM
intersting. thanks!
a
Albert Chang
11/05/2021, 12:02 AM
For a two-state checkbox,
Modifier.toggleable()
is better semantics-wise. Here’s a similar implementation which uses
Switch
.
c
Colton Idle
11/05/2021, 12:06 AM
Thanks @Albert Chang. That makes sense. Was this documented somewhere? Curious where I would go back to look this up as I know it's going to come up like 6 months from now lol