Open ghost opened 3 years ago
I think this is something you can achieve in your code. Wherever you trigger the action to switch pages, why not have a modal or dialog show up first before you call Navigator.push
Thanks @ignertic, but it is not that easy. :( If the user changes the url in the browser to go to another page, I can't intercept it or at least I haven't found a way to do it. Thanks.
What are the ramifications if you try to achieve this with some javascript ?
I don't know, I am not an expert in javascript. :(
Hello, Suppose I have a window with a form, that form has been modified, so the modifications are pending to be saved. Now I open another window changing the url and therefore the current one (which has the modifications) closes, how can I put an alert message to prevent or accept navigating to the new url and accept or cancel the pending modifications in the current form? I have tried to do it through the router.define handler, but it is not async. Is there a standardized method to control this type of situation? Thanks for your help. Regards, Jose