-
Notifications
You must be signed in to change notification settings - Fork 697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature(checkbox): support proper indeterminate state #3584
Comments
I haven't been able to reproduce this, tried adding a select in the playground to change the bound value and it works as planned: <USelect v-model="checked" :items="[true, false, 'indeterminate']" />
<UCheckbox v-model="checked" /> Please fill up a bug report with a reproduction next time! |
@benjamincanac looks like in the playground, you are correct in that you can manually set the state back to indeterminate, but you still cannot change the state back to indeterminate with the checkbox itself, which was the reason for the feature request. Does this still not make sense as a feature request? |
Oh you mean through the UI? You can take a look at this Table example to see how its done: https://ui.nuxt.com/components/table#with-row-selection |
That is still not through the UI via the checkbox itself. That is through another event (and thus js/ts/etc, which technically could be trigger by something in the UI), which sets the state of the checkbox, which isn't quite the same. I'd like to toggle through all three states, just by clicking on the checkbox itself. |
You might be able to achieve this manually by listening to the However, I don't think the |
Description
Right now, it's only possible to have checkboxes be in an indeterminate state as its initial state, and not be able to go back to that state after it has moved away from that state. My use case is a checkbox that is used to control a query parameter for filtering results.
public = <true|false>
results are included. and when the checkbox is false, it filters thatpublic
field by the value of the checkbox. Effectively,*
,true
, andfalse
states.Doesn't look as though this is possible today, with checkboxes, or with
Switch
.I have attempted to re-set the value to
indeterminate
, however, it looks as though the Checkbox ignores this state change.Additional context
No response
The text was updated successfully, but these errors were encountered: