Skip to content
Star

PxFormRow

A schema-driven row of sub-fields. Renders a mix of static text, number inputs, and searchable selects side by side from a field.components definition — e.g. a "between X and Y" range field. Used internally by PxSchemaForm.

Usage

Demo
Between
and

Props

PropTypeDefaultDescription
fieldrequiredobjectField definition. `field.components` is a list of sub-components (static_text, integer, select) rendered side by side.
getFieldRules(comp) => string() => ''Returns a vee-validate rules string for a given sub-component.
getMinNumberValue(comp) => number | null() => nullReturns the min value for an integer sub-component.
getMaxNumberValue(comp) => number | null() => nullReturns the max value for an integer sub-component.
validateMinRange(comp) => void() => {}Called to validate the lower bound of an integer sub-component.
validateMaxRange(comp) => void() => {}Called to validate the upper bound of an integer sub-component.

FieldComponent Interface

ts
interface FieldComponent {
  key?: string
  type: 'static_text' | 'integer' | 'select'
  label?: string
  value?: unknown
  rules?: Record<string, unknown>
  option_source?: { options: { label: string; value: unknown }[] }
}

Emits

EventPayloadDescription
search{ field, searchTerm }Emitted while typing in a select-type sub-component.
change{ option, field }Emitted when a select-type sub-component value changes.

Built with VitePress