Files
oa/documentation/plugins/multiselect/multiselect-multiple-object-documentation.md
2025-05-24 01:49:48 +09:00

1.9 KiB

optionMultipleObject, valueMultipleObject
optionMultipleObject valueMultipleObject
batman robin joker
Batman Robin Joker
robin

Options object

The <Multiselect /> component can receive data with his options props. You can either pass an Array or Object to the options props. You can also activate the multiple mode by setting the mode prop to mode="multiple".

<script setup lang="ts">
const valueMultipleObject = ['robin']
const optionMultipleObject = {
  batman: 'Batman',
  robin: 'Robin',
  joker: 'Joker',
}
</script>

<template>
  <VField v-slot="{ id }">
    <VControl>
      <Multiselect
        v-model="valueMultipleObject"
        :attrs="{ id }"
        mode="multiple"
        :options="optionMultipleObject"
        placeholder="Select options"
      />
    </VControl>
  </VField>
</template>