gcds-components icon indicating copy to clipboard operation
gcds-components copied to clipboard

bug: v-model not working on gcds-checkbox

Open ethanWallace opened this issue 1 year ago • 5 comments

Context : Issue was flagged first by DFO user , but product team ended creating the ticket

As noted in this comment the v-model is not working properly for the gcds-checkbox component in Vue.

Example

https://stackblitz.com/edit/vitejs-vite-vmu2f2?file=src%2FApp.vue

<script setup>
import { ref } from 'vue'
const checkboxValue = ref(false)
</script>

<template>
<gcds-checkbox
    checkbox-id="checkbox-default"
    label="CheckboxLabel"
    name="checkbox"
    hint="Description or example to make the option clearer."
    v-model="checkboxValue"
    >
</gcds-checkbox>
</template>

ethanWallace avatar Sep 04 '24 14:09 ethanWallace

Start with investigation.

adorayi avatar Sep 04 '24 15:09 adorayi

Might need to configure componentModel in output configuration for gcds-checkbox https://stenciljs.com/docs/vue#componentmodels

ethanWallace avatar Sep 04 '24 15:09 ethanWallace

Being tackled today to investigate

ClementineHahn avatar Sep 19 '24 15:09 ClementineHahn

Pausing on this since we are revisiting the checkbox component soon

daine avatar Oct 02 '24 04:10 daine

Should be fixed with the latest Checkbox updates coming soon.

adorayi avatar Mar 26 '25 15:03 adorayi

Ready for verification now that Fieldset updates is published.

adorayi avatar Jun 18 '25 15:06 adorayi

With introduction of gcds-checkboxes the gcds-checkbox has been removed. gcds-checkboxes has been confirmed to work with v-model

ethanWallace avatar Jun 18 '25 17:06 ethanWallace