Infolist fails to update after form submission when on same livewire component
Package
filament/filament
Package Version
v4.2.0
Laravel Version
v12.36.1
Livewire Version
v3.6.4
PHP Version
PHP 8.3.27
Problem description
When you have both a form and infolist on the same livewire component (in my case a Filament Page), after entering something into the form, submitting and then changing the state the infolist relies on, it does not update the infolist
https://github.com/user-attachments/assets/4b90cd1c-c68d-4059-919f-b9bec1b15838
.
See video of example (in a different project of mine, but exactly the same component).
- I click the submit without entering anything, and the
valueupdates - I then refresh, enter a value, click submit and
valuedoes not update as it should.
Where I update the infolist data. (see app/Filament/Pages/Test.php)
public function submit()
{
$this->someData = [
'value' => Str::uuid()->toString()
];
}
Expected behavior
I would expect after filling in the form, calling the livewire action submit that the data should trigger the infolist to re-render itself with the new data.
Steps to reproduce
- Head to /admin/test
- Click submit and see
valuegets updates with a uuid - Refresh page
- Enter a value into the
some fieldinput - Click submit and see
valueis still blank, even though a livewire request has been sent to server - Extra: click again and it will update (but this will be the old previous stale value)
Reproduction repository (issue will be closed if this is not valid)
https://github.com/harvey-4thd/filament-infolist-not-updating
Relevant log output
Please make the reproduction repository public
@danharrin Oops, my bad. Have changed.
Does ->constantState(fn () => $this->someData) work?
Does
->constantState(fn () => $this->someData)work?
No, the infolist now does not update at all (even when submitted multiple times).