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
37 stars 12 forks source link

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

Open ethanWallace opened 2 months ago

ethanWallace commented 2 months ago

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

Start with investigation.

ethanWallace commented 2 months ago

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

ClementineHahn commented 2 months ago

Being tackled today to investigate

daine commented 1 month ago

Pausing on this since we are revisiting the checkbox component soon