Rick Regan02/06/2021, 5:14 PM
onCheckedChange: (Boolean) -> Unit
only to support
onClick: () -> Unit
? 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?
jim02/06/2021, 5:22 PM
). 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 Regan02/06/2021, 5:30 PM
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?
jim02/06/2021, 7:36 PM
(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
, which isn't that meaningful.