cds-snc / gcds-components

GC Design System Components is a monorepo managing the web components of the GC Design System. | « GC Design System Components » (Composants de Système de design GC) est un référentiel unique qui gère les composants Web de Système de design GC.
https://design-system.alpha.canada.ca/
MIT License
32 stars 11 forks source link

bug: v-model not working on gcds-checkbox #629

Open ethanWallace opened 2 weeks ago

ethanWallace commented 2 weeks ago

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>
adorayi commented 2 weeks ago

Start with investigation.

ethanWallace commented 2 weeks ago

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