How to make logic `afterStateUpdateJs()` in filament v3?

Leandro Ferreira (@leandrocfe) on X
In Filament V4, a new method called afterStateUpdatedJs will be introduced, enabling state updates on the client side using Javascript 🤯
From An unknown user
X
No description
7 Replies
khairulazmi_
khairulazmi_3w ago
as for v3 you can do something like this .
->extraInputAttributes([
'@change' => "() => {
const email = \$event.target.value;
$wire.set('mountedActionsData.0.email', email.toLowerCase());
}",
])
->extraInputAttributes([
'@change' => "() => {
const email = \$event.target.value;
$wire.set('mountedActionsData.0.email', email.toLowerCase());
}",
])
Kaesa Lyrih
Kaesa LyrihOP3w ago
@change // what this? alphine? or filament or livewire?
@change // what this? alphine? or filament or livewire?
- mountedActionsData, what this form? How debug it using console.log()?
khairulazmi_
khairulazmi_3w ago
change is a javascript event . you can do console.log inside those method .
Kaesa Lyrih
Kaesa LyrihOP3w ago
wait, @change js humm this is alpine js directive? or native javascirpt?
khairulazmi_
khairulazmi_3w ago
native js bro .
Kaesa Lyrih
Kaesa LyrihOP3w ago
can you share docs about that, i think @change = directive like @click in alpinejs.
awcodes
awcodes3w ago
@change is an alpine wrapper for the native onChange

Did you find this page helpful?