Disable unsaved changes warning from navigation if "Cancel" is used in the Actions framework

  • 1
  • Idea
  • Updated 2 years ago
  • Not Planned
The ability to notify the user when they are going to navigate away from a Skuid page with unsaved changes is awesome. I have a use case where I want to put a "Cancel" button at the top of the page as they go through a wizard. The button is using the action framework to show a message and block the UI, cancel changes, and then redirect to they keyprefix for the object. However, when the redirect happens, it still gives the user a warning about navigating away.

It would be GREAT AND SUPER AWESOME if we could have a way to disable this feature when doing this type of action in the framework.
Photo of Will.I.Yam

Will.I.Yam

  • 216 Points 100 badge 2x thumb

Posted 4 years ago

  • 1
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
Will, you can disable the warning if you make sure to Cancel all Models in the page, not just one --- the reason the warning is showing up is that there is one or more Models in the page that still have unsaved changes. Your Cancel action is probably cancelling just one Model --- if you set it to cancel multiple Models, then the unsaved changes warning will go away completely.
Photo of Will.I.Yam

Will.I.Yam

  • 216 Points 100 badge 2x thumb
Snaps. You rock!

--Edit-- Spoke too soon. It's still asking me to confirm even after setting all models to cancel.
(Edited)
Photo of Shannon Hale

Shannon Hale

  • 312 Points 250 badge 2x thumb
If this is still happening after setting all models to cancel then it's a bug - we don't want to bypass functionality. (Canceling the model is the way this should work.) I'll see if I can reproduce it, and if so, file a bug.