Spread ​
The spread input type renders VInputSpread, a key-value metadata editor. Each row has a key field, a value field, and a type toggle (string / number / boolean). Users can add, edit, and delete rows; clicking "Save All" commits the changes. Reserved keys (from the model or explicitly configured) are hidden from the editor.
Hydrate ​
Class: SpreadHydrateConfig type: spreadOutput type: input-spread → VInputSpread
The hydrate:
- Sets
typetoinput-spreadand forcescolto full-width (cols: 12across all breakpoints) - When
_moduleName/_routeNameare present:- Loads
reservedKeysfrom$model->getReservedKeys()and merges anyspreadableinputs from the route's schema - Sets
nameto$model->getSpreadableSavingKey()
- Loads
- Without module context: falls back to
reservedKeys: []andname: 'spread_payload' - Accepts an inline
scrollableflag that toggles vertical scrolling on the rows container
Usage ​
Auto-resolved (module context) ​
php
[
'type' => 'spread',
]Explicit with reserved keys ​
php
[
'type' => 'spread',
'name' => 'meta',
'reservedKeys' => ['id', 'created_at', 'updated_at'],
]Scrollable with fixed height ​
php
[
'type' => 'spread',
'scrollable' => true,
'height' => '400px',
]Schema Defaults ​
| Key | Default | Description |
|---|---|---|
col | {cols:12, sm:12, md:12, lg:12, xl:12} | Always full width |
name | 'spread_payload' | Field name (or model's spreadable key) |
reservedKeys | [] | Keys hidden/blocked from editing |
scrollable | false | Enable vertical scroll on the row list |
height | '300px' | Height of the scrollable rows container |
See Also ​
- Json — Grouped JSON fields (fixed schema)
- Repeater — Repeatable rows with a defined schema
- Hydrates reference — Resolution table and schema contract