Skip to content

Type Alias: RCustomFieldDefaultSlotProps

ts
type RCustomFieldDefaultSlotProps = Pick<
  RCustomFieldProps,
  "modelValue" | "onUpdate:modelValue" | "onUpdate:model-value"
> & {
  autofocus: boolean;
  disabled: boolean;
  name: string | undefined;
  readonly: boolean;
} & {
  [x: string]: any;
} & Partial<Record<string, unknown>>;

Props object passed to custom field implementations via the default slot.

Contains the essential props that custom field implementations need to integrate properly with the wrapper's state management and event system. Includes model value handling, validation state, and core input properties.

Key properties:

  • modelValue: Current field value
  • onUpdate:modelValue / onUpdate:model-value: Value update handlers
  • autofocus, readonly, disabled: State flags
  • name: Input name attribute
  • Additional props spread from VField/VInput processing

Type Declaration

NameType
autofocusboolean
disabledboolean
namestring | undefined
readonlyboolean

Example

typescript
// In custom field slot
<template #default="{ props }">
  <input
    :value="props.modelValue"
    @input="props['onUpdate:modelValue']($event.target.value)"
    :readonly="props.readonly"
    :disabled="props.disabled"
  />
</template>