user2806671
user2806671

Reputation: 3

how to get the checkbox checked using vue

i'm trying to get the checkbox checked when the option is checked using v-select, the options are getting selected but the checkbox is not get checked guide me to achieve this. recommended not to use vuetify

<template>
<template v-if="options.length > 0 && display">
  <div class="container">
    <p>{{ label }}</p>
    <v-select
    class="multi-select"
    :options="options"
    :reduce="option => option.code"
    v-model="selectedOptions[prop].value"
    @update:modelValue="modelValue => setSelectedOptions(prop, modelValue)"
    multiple>
    <template #option="{label, isSelected}">
      <label>
        <input
            type="checkbox" :checked="isSelected" />
          />
          {{ label }}
        </label>
    </template>
    </v-select>
  </div>
</template>

Upvotes: 0

Views: 17

Answers (0)

Related Questions