Rick Regan
02/06/2021, 5:14 PMCheckbox
have onCheckedChange: (Boolean) -> Unit
instead of onClick: () -> Unit
only to support TriStateCheckbox
? I can see why it's there for that but if you are not using TriStateCheckbox (the normal usage case?) it seems strange that it's just not onClick (like Button, RadioButton, TextButton, and even TriStateCheckbox itself). Why not have a second signature for CheckBox with onClick instead of onCheckedChange?jim
02/06/2021, 5:22 PMTextField
).
The only reason we don't pass in a state for TriStateCheckbox is that the intended "next state" is ambiguous and needs to be decided by the app developer.Rick Regan
02/06/2021, 5:30 PMRadioButton
have a suggested state of "selected" then? Or is it intentional to omit it to cover groups of radio buttons, where you'd want to deselect the other ones at a higher level?jim
02/06/2021, 7:36 PMRadioButton
(which is almost always used in a group and usually you can't deselect all items within the group), the suggested state would always be true
, which isn't that meaningful.