Hello,
Thanks for the package.
I found an issue where assigning an id to the toggle does not cause the value to switch upon clicking the label with the same for value.
Expected
To be able to assign an id to the component with value switch1 and add that same value to the for attribute of a label. Clicking on the label should toggle the state
What happened instead?
The state does not get updated
Reproduction
- Add the package to a Vue or Nuxt app
<template>
<Toggle id="s1" name="s1"
v-model="value"
></Toggle>
<label for="s1">Switch it up</label>
</template>
<script setup lang="ts">
import Toggle from "@vueform/toggle";
const value = ref(false);
</script>
Hello,
Thanks for the package.
I found an issue where assigning an
idto the toggle does not cause the value to switch upon clicking the label with the sameforvalue.Expected
To be able to assign an id to the component with value
switch1and add that same value to theforattribute of a label. Clicking on the label should toggle the stateWhat happened instead?
The state does not get updated
Reproduction