VVibeFlui

Value Mapping

VibeFlui maps row data into form values with mapRowToFormValues.

Create values

Create mode uses createValueMode, which defaults to "empty".

ModeBehavior
emptyUses the empty value for the field type.
defaultUses defaultValue, or the field type empty value.
hiddenExcludes the field from mapped values and rendering.
TS
{
  name: "status",
  type: "select",
  createValueMode: "default",
  defaultValue: "active"
}

Edit values

Edit mode uses editValueMode, which defaults to "fromRow".

ModeBehavior
fromRowReads from valueFrom or name.
emptyUses the empty value for the field type.
defaultUses defaultValue, or the field type empty value.
hiddenExcludes the field from mapped values and rendering.
TS
{
  name: "password",
  type: "password",
  createValueMode: "empty",
  editValueMode: "empty",
  helperText: "Leave empty on edit to keep the current password."
}

valueFrom

Use valueFrom when the backend row shape differs from the submit payload shape.

TS
{
  name: "roleId",
  label: "Role",
  type: "select",
  valueFrom: "role.id"
}

Given this row:

JSON
{
  "id": "usr_001",
  "role": {
    "id": "admin",
    "name": "Administrator"
  }
}

The form value becomes:

JSON
{
  "roleId": "admin"
}

Empty values by type

TypeEmpty value
checkbox, switchfalse
multiselect, checkbox-group, tags[]
number, range""
hidden, file, imageundefined
all other types""

View mode

The detail view path uses edit-style mapping so values come from the row by default.