Introduction
The text input column allows you to render a text input inside the table, which can be used to update that database record without needing to open a new page or a modal:Validation
You can validate the input by passing any Laravel validation rules in an array:Customizing the HTML input type
You may use thetype() method to pass a custom HTML input type:
Setting the HTML input mode
You may use theinputMode() method to set the HTML inputmode attribute, which hints at the type of keyboard to show on mobile. For numeric inputs, use inputMode('decimal') for decimal values or inputMode('numeric') for integers:
Setting the numeric step
When usingtype('number'), you may use the step() method to set the HTML step attribute. Use step('any') for decimal values or step('1') for integers:
Lifecycle hooks
Hooks may be used to execute code at various points within the input’s lifecycle:Adding affix text aside the field
You may place text before and after the input using theprefix() and suffix() methods:
As well as allowing static values, the prefix() and suffix() methods also accept a function to dynamically calculate them. You can inject various utilities into the function as parameters.
prefix() and suffix() methods also accept a function to dynamically calculate them. You can inject various utilities into the function as parameters.Learn more about utility injection.
Column
$column
Filament\Tables\Columns\Column
The current column instance.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current table row.
Row loop
$rowLoop
stdClass
The row loop object for the current table row.
State
$state
mixed
The current value of the column, based on the current table row.
Table
$table
Filament\Tables\Table
The current table instance.
Using icons as affixes
You may place an icon before and after the input using theprefixIcon() and suffixIcon() methods:
As well as allowing static values, the prefixIcon() and suffixIcon() methods also accept a function to dynamically calculate them. You can inject various utilities into the function as parameters.
prefixIcon() and suffixIcon() methods also accept a function to dynamically calculate them. You can inject various utilities into the function as parameters.Learn more about utility injection.
Column
$column
Filament\Tables\Columns\Column
The current column instance.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current table row.
Row loop
$rowLoop
stdClass
The row loop object for the current table row.
State
$state
mixed
The current value of the column, based on the current table row.
Table
$table
Filament\Tables\Table
The current table instance.
Setting the affix icon’s color
Affix icons are gray by default, but you may set a different color using theprefixIconColor() and suffixIconColor() methods:
As well as allowing static values, the prefixIconColor() and suffixIconColor() methods also accept a function to dynamically calculate them. You can inject various utilities into the function as parameters.
prefixIconColor() and suffixIconColor() methods also accept a function to dynamically calculate them. You can inject various utilities into the function as parameters.Learn more about utility injection.
Column
$column
Filament\Tables\Columns\Column
The current column instance.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current table row.
Row loop
$rowLoop
stdClass
The row loop object for the current table row.
State
$state
mixed
The current value of the column, based on the current table row.
Table
$table
Filament\Tables\Table
The current table instance.