Open
Description
Description
An option to prevent navigation when the form has changed would be cool especially with a slot to provide a custom modal to confirm/cancel instead of just using window.confirm()
.
From my point of view the check could be as simple as if an user had changed any field even if changed back to the previous value (see source 2 for an example of that behavior).
I'm not sure if this is something for Nuxt UI to implement directly, but it feels like a feature to make UI's forms even better. 😄
Sources:
- https://austingil.com/prevent-browser-refresh-url-changes-route-navigation-vue/
- https://vuetensils.com/components/Form.html#preventing-navigation
Additional context
No response