filament icon indicating copy to clipboard operation
filament copied to clipboard

Infolist fails to update after form submission when on same livewire component

Open harvey-4thd opened this issue 1 month ago • 4 comments

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).

  1. I click the submit without entering anything, and the value updates
  2. I then refresh, enter a value, click submit and value does 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

  1. Head to /admin/test
  2. Click submit and see value gets updates with a uuid
  3. Refresh page
  4. Enter a value into the some field input
  5. Click submit and see value is still blank, even though a livewire request has been sent to server
  6. 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


harvey-4thd avatar Nov 04 '25 09:11 harvey-4thd

Please make the reproduction repository public

danharrin avatar Nov 04 '25 09:11 danharrin

@danharrin Oops, my bad. Have changed.

harvey-4thd avatar Nov 04 '25 09:11 harvey-4thd

Does ->constantState(fn () => $this->someData) work?

danharrin avatar Nov 04 '25 09:11 danharrin

Does ->constantState(fn () => $this->someData) work?

No, the infolist now does not update at all (even when submitted multiple times).

harvey-4thd avatar Nov 04 '25 11:11 harvey-4thd