ページ · Laravilt
TextInputColumn
Configure a text input for a table column.
php
The cell shows a text input. The value is saved when the user presses Enter or leaves the input, and pressing Escape discards the edit. See Editable columns for how the save is authorized and validated.
Inline editing requires Laravilt v1.1 or later.
The value is validated as nullable|string, or nullable|numeric when type('number') is set. Your rules() are added after those. Clearing the input stores null, unless your rules reject an empty value (for example, required).
Input types
php
Affixes
php
inputPrefix() and inputSuffix() appear as text next to the input. The bundled tables don't show the inputPrefixIcon() and inputSuffixIcon() icons yet.
Hooks and disabling
php
API reference
| Method | Description |
|---|---|
type() | HTML input type |
inputPrefix(), inputSuffix() | Text shown next to the input |
inputPrefixIcon(), inputSuffixIcon() | Icons inside the input (not shown by the bundled tables yet) |
inputPrefixIconColor(), inputSuffixIconColor() | Icon colors |
placeholder() | Placeholder text |
rules() | Validation rules, added after the type rules |
disabled() | Make the input read-only |
beforeStateUpdated(), afterStateUpdated() | Update hooks |