Releases: tanthammar/filament-extras
Debounce Nominatim search
It appears that it was not enough to improve headers. Needed to debounce the input.
Full Changelog: 4.2.1...4.2.2
Fix Nominatim
matching improved api restrictions
Full Changelog: 4.2.0...4.2.1
Laravel 11
4.2.0 bump Laravel 11
Conditional reactivity macro, belongsToMany team checklist, PrettyPrint view field
- Conditional field reactivity macro,
- Jetstream belongsToMany team checklist,
- PrettyPrint view field
Filament v3 and Livewire v3 version
4.0.0 Async Alpine phone input
Breaking changes
Renamed some Classes when introducing a new PhoneInput field.
Breaking
This release requires the following PR to be accepted. filamentphp/filament#5083
Intl Tel input
Rules for each item in array fields
More macros
New macros
Change the state of the current field
- loadAs => afterStateHydrated
- saveAs => dehydrateStateUsing
- updateAs => afterStateUpdated
Any callback
- onLoaded => afterStateHydrated
- onSave => dehydrateStateUsing
- onUpdated => afterStateUpdated
loadAs, saveAs, updateAs
Changes the state of the current field
Example
//Instead of this
TextInput::make('name')
->afterStateHydrated(function (TextInput $component, $state) {
$component->state(ucwords($state));
})
//use the macro
TextInput::make('name')->loadAs(fn ($state) => ucwords($state))
onLoaded, onSave, onUpdated
Just a way to be more clear on the lifecycle. I never remember the Filament naming or what it means.
I use it when I want to change the state of another field.
Example
TextInput::make('slug')
//Instead of this
TextInput::make('title')
->reactive()
->afterStateUpdated(function ($set, $state) {
$set('slug', \Str::slug($state));
})
//use the macro to be more clear about the lifecycle stage
TextInput::make('title')
->reactive()
->onUpdated(fn ($set, $state) => $set('slug', \Str::slug($state)))
TodoField/dummyField
Make a note to self (TODO) to create a custom field, later...
Shows the TODO/task as a notification in your forms.
Throws an error if you try to set your project live without completing the task.
Example:
TodoField::make('Create a custom positioning field')
Mixed new components
1.5.0 HelpModal, JetstreamAuthorSection, SpatieSlug, Uuid, Nominatim