FilamentF
Filament13mo ago
treii28

how to update state in custom field?

How do I update an entangled state variable so that the filament form knows the value has been updated?

I have a class that gets passed the state via $wire.$entangle({{ $getStatePath() }}')

In this case, I'm setting the state from an array of lat/lon coordinates [ 'lat' => 12, 'lon' => 45 ] in an array.

If in my javascript I then set state.lat = 56, how can I make sure laravel/filament knows it has changed so the ->afterStateUpdated() triggers?
Was this page helpful?