Vuesax: Can't uncheck the checkbox

Created on 15 May 2018  路  5Comments  路  Source: lusaxweb/vuesax

  • OS: Windows 10
  • Node.js version: v10.0.0
  • Vuesax version: ^3.0.8
  • Browser version: Chrome 66.0.3359.139
  • package manager: npm

I tried to bind an object as a value to a checkbox but I see a problem, you can't uncheck it.

<vs-col v-for="(region, index) in regions" :key="index">
  <vs-checkbox v-model="form.regions" :vs-value="region" >{{ region.name }}</vs-checkbox>
</vs-col>
bug good first issue help wanted

All 5 comments

Could you pass me the structure of the object? to try to redo the problem thank you very much for the contribution

@luisDanielRoviraContreras Here is a little sample of the object structure I am working with.

data: () => ({
  regions: [
    { id: 1, name: 'Queensland' },
    { id: 2, name: 'South Australia' },
    { id: 3, name: 'New South Wales' },
  ]
})

then should not it be only regions directly without form? something like that

<vs-col v-for="(region, index) in regions" :key="index">
  <vs-checkbox v-model="regions" :vs-value="region" >{{ region.name }}</vs-checkbox>
</vs-col>

@luisDanielRoviraContreras Well, I have a form object which holds the regions model like this.

data: () => ({
  form: {
    regions: []
  },
  regions: [
    { id: 1, name: 'Queensland' },
    { id: 2, name: 'South Australia' },
    { id: 3, name: 'New South Wales' },
  ]
})

@VerzatileTom Ready friend and the problem is solved thank you very much please check if it works as it should

There is support in the version v3.0.19

https://lusaxweb.github.io/vuesax/components/checkbox.html#array-object-values

Thank you very much for using Vuesax and contributing to the 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jbienesdev picture jbienesdev  路  3Comments

danyakov picture danyakov  路  3Comments

andresilva-cc picture andresilva-cc  路  3Comments

webafra picture webafra  路  3Comments

sangdth picture sangdth  路  4Comments