Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modal loses state after opening #14997

Open
ralphjsmit opened this issue Dec 4, 2024 · 0 comments
Open

Modal loses state after opening #14997

ralphjsmit opened this issue Dec 4, 2024 · 0 comments
Labels
Milestone

Comments

@ralphjsmit
Copy link
Contributor

ralphjsmit commented Dec 4, 2024

Package

filament/filament

Package Version

v3.2.127

Laravel Version

v11.34.2

Livewire Version

v3.5.12

PHP Version

8.3.10

Problem description

When I open a page for the first time (so no redirect, just refresh the page) and then let open a default action with modal, the modal state seems refreshed. Default or mounted content appears very briefly and then disappears.

Also whenever changing a value, the modal content disappears totally, but the black overlay stays.

However, when I navigate to another page in SPA mode and then back to the page with the default action modal, the modal works fine and there is no issue at all. When not using SPA mode the issue is present always.

There is some strange behavior that the first 2 times after code/dependency changes the modal works, but when you keep reloading the page and trying again then the issue keeps appearing constantly.

I tried various things to make it work like removing mountUsing() and using ->default() but that all had no effect.

See https://stream.new/assets/cyZsHnC6trJCOJ02ve02Jsy4Lc022jtNS1Ow7xxtLVbvCQ.

Expected behavior

The modal should work as normal.

Steps to reproduce

  1. Go to Orders page and edit a random order. A modal should appear with the status and test field filled in with a value. (If you see it correctly filled in, try refreshing the page 2-3 times until the bug starts to appear).
  2. The modal opens without filled in values. Changing a status causes the modal contents to disappear entirely and only leave the gray overlay.
  3. Navigating to another page like the List Orders and then go back to an Edit Order makes the modal work correctly.

Reproduction repository (issue will be closed if this is not valid)

https://github.com/ralphjsmit/demo

Relevant log output

^ Branch rjs/bug-report-modal.

Donate 💰 to fund this issue

  • You can donate funding to this issue. We receive the money once the issue is completed & confirmed by you.
  • 100% of the funding will be distributed between the Filament core team to run all aspects of the project.
  • Thank you in advance for helping us make maintenance sustainable!
Fund with Polar
@github-project-automation github-project-automation bot moved this to Todo in Roadmap Dec 4, 2024
@ralphjsmit ralphjsmit changed the title Modal default Modal loses state after opening Dec 4, 2024
@danharrin danharrin added this to the v3 milestone Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

No branches or pull requests

2 participants