Skip to content

Type Alias: SingleVariantSlotArgs<T>

ts
type SingleVariantSlotArgs<T> = [
  {
    add: () => void;
    isMultiAdd: boolean;
    props: SingleVariantPropBindings<T>;
  },
];

Arguments passed to the single-variant slot function. The slot receives an object with props for v-model binding and an add function to commit the current value to the multiple selection.

Type Parameters

Type ParameterDefault type
Tany

Example

typescript
// Using the single-variant slot
<RMultipleField>
  <template #single-variant="{ props, add }">
    <VTextField
      v-bind="props"
      @keydown.enter="add"
      placeholder="Enter custom value..."
    />
  </template>
</RMultipleField>