Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alert users when they're navigating away from a form that has unsaved changes #673

Open
3 tasks
adrianthedev opened this issue Feb 17, 2022 · 3 comments · May be fixed by #3346
Open
3 tasks

Alert users when they're navigating away from a form that has unsaved changes #673

adrianthedev opened this issue Feb 17, 2022 · 3 comments · May be fixed by #3346
Assignees
Labels
Avo 2 Avo 3 Enhancement Not necessarily a feature, but something has improved Front end Good first issue Good for newcomers hacktoberfest Help wanted We could use some help with this Stale exempt

Comments

@adrianthedev
Copy link
Collaborator

adrianthedev commented Feb 17, 2022

Feature

Whenever you go on an edit page and you start filling in the details for a record, you don't have anything to stop it from navigating away and losing all that data.

We should add something that stops the user from doing that with a dialog/alert box that says "Are you sure you want to navigate away from the page? You will lose all your changes."

  • Check if the user made any changes. If not, then don't display any warning.
  • If the user changed anything on the form, display the warning.
  • Bonus: Submit form on CMD + Return

When a resource has a lot of fields and the edit form view is very long, it can be easy to forget to scroll back up to the top to hit save. It would be nice if resources had a configuration option that allowed for optionally displaying the save button at the bottom of the form as well.

@adrianthedev adrianthedev added Enhancement Not necessarily a feature, but something has improved Good first issue Good for newcomers labels Feb 17, 2022
@github-actions
Copy link
Contributor

This issue has been marked as stale because there was no activity for the last 60 days

@coolprobn
Copy link

coolprobn commented Oct 15, 2024

@adrianthedev I will take this on, can you assign it to me?

I already have a working implementation after working for few hours today, will create a WIP PR tomorrow and add tests right after.

@adrianthedev
Copy link
Collaborator Author

Awesome @coolprobn! Thanks for working on this 💪

@coolprobn coolprobn linked a pull request Oct 17, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Avo 2 Avo 3 Enhancement Not necessarily a feature, but something has improved Front end Good first issue Good for newcomers hacktoberfest Help wanted We could use some help with this Stale exempt
Projects
Status: Triage
Development

Successfully merging a pull request may close this issue.

2 participants