almino / semantic-ui-vue2

Semantic UI Integration for Vue 2
123 stars 11 forks source link

Checkbox is not unchecked at start #5

Closed NicoAiko closed 6 years ago

NicoAiko commented 7 years ago

I try to create an unchecked checkbox (slider), but it stays checked. <ui-checkbox type="slider" label="Test" :checked="false"></ui-checkbox> should be working, right? Otherwise, I suppose, there is a documentation yet to be made on how to correctly set up the checkbox module.

Thanks!

jmealo commented 7 years ago

@nicoaiko Try omitting the checked attribute entirely. Boolean attributes are considered true if present. In most cases you have to find a way to conditionally include the attribute instead of binding the boolean to the value. When you're done you may find yourself questioning templating languages in general and your framework of choice 💫😱😩.

almino commented 6 years ago

I couldn't find a way to have both checked and and v-model attributes working together. The v-model will always determine whether is checked or not.