FilamentF
Filament5mo ago
Meap

Second modal always shows the first modal's content

Hi everyone, I'm stuck on a stubborn modal issue. On a custom page with a table, my first modal action works fine. But after I close it, any other modal action I click just shows the content of the first one again, not the new one.

I've tried all the standard solutions for this "stale state" problem, and even the most aggressive fixes are not working:
  1. Overriding mountAction() to call $this->reset() at the very beginning. The state is being reset on the server.
  2. Using JavaScript to listen for an event and forcefully clear the modal's HTML (.innerHTML = '') before the new content is loaded.
Even with both the server-side state and the frontend DOM being cleared on every click, the old modal content still reappears.Has anyone ever seen behavior like this? I'm looking for ideas on what could possibly cause the frontend to ignore state changes so aggressively.

Thanks for any help!
Was this page helpful?