is there a way with retool to prompt a modal if there is any unsaved change when leaving the app. (say the app has a form that needs inputs and saving)
Hi Philippe! If there was an event to watch for app closing, then we could trigger a modal to open based on 1. this ideal, but non-existent app closing event and 2. !textInput1.value (or some way to see if a form input is empty or not).
If you throw your form into a modal, you could watch for the modal closing and check if any components are empty. If empty, you could trigger the same modal to open (or trigger a notification to show, or open a new modal) with something like this event handler: