Open huntabyte opened 6 hours ago
Personally really like this idea. I really don't like having to check for indeterminate in my code since it ends up adding extra code in my callbacks:
<Checkbox
onCheckedChange={(checked) => update(checked == 'indeterminate' ? false : checked)}
/>
Describe the feature in detail (code, mocks, or screenshots encouraged)
I've been thinking it doesn't make a ton of sense to have the checkbox
checked
state to be of typeboolean | 'indeterminate'
, since there is no way to toggle into indeterminate state after it is initially changed. Perhaps there should be anindeterminate
prop that iftrue
will start the checkbox as indeterminate.This enables us to have
checked
typed asboolean
.How does everyone feel about this?
What type of pull request would this be?
Enhancement
Provide relevant links or additional information.
No response