Filament alert or notification when users wants to go back to previous window / url.
Hi! I'm new to FilamentPHP and I'm currently exploring its features and functionalities. I noticed that when I tried to go to https://demo.filamentphp.com/shop/products/products/create . When I'm halfway done to create a product, and I want to go back to other route / url, the app shows me an alert something like:
To recreate the "Leave site? Changes you made may not be saved" alert in FilamentPHP, you can use JavaScript's beforeunload event. This event triggers a confirmation dialog when the user tries to navigate away from the page with unsaved changes.