You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some cases, I run into boolean values that I want to display inverted from how they are stored. For example, a record may have a boolean "disabled" field, but I want the UI to show a switch as on when enabled (false).
It'd be nice if selectable components (Switches, Checkboxes, etc.) could have their true-value set to a Boolean of false. This should allow setting :true-value="false" and :false-value="true" to be used as a way of inverting the switch, so a false boolean value would show the switch on.
I should be able to take care of it by using :value="!myBoolean" and @input="myInvertMethod" instead of v-model, but since true-value and false-value are almost there...
The text was updated successfully, but these errors were encountered:
In some cases, I run into boolean values that I want to display inverted from how they are stored. For example, a record may have a boolean "disabled" field, but I want the UI to show a switch as on when enabled (false).
It'd be nice if selectable components (Switches, Checkboxes, etc.) could have their true-value set to a Boolean of false. This should allow setting :true-value="false" and :false-value="true" to be used as a way of inverting the switch, so a false boolean value would show the switch on.
I should be able to take care of it by using :value="!myBoolean" and @input="myInvertMethod" instead of v-model, but since true-value and false-value are almost there...
The text was updated successfully, but these errors were encountered: