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

Prevent user from leaving page when pending changes present #10

Open
ohdzdev opened this issue May 15, 2019 · 1 comment
Open

Prevent user from leaving page when pending changes present #10

ohdzdev opened this issue May 15, 2019 · 1 comment
Labels
enhancement New feature or request Frontend Deals with presentation of web in some way shape or form Priority: Low

Comments

@ohdzdev
Copy link
Owner

ohdzdev commented May 15, 2019

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

  • When a user has pending changes on the diet screen (or really any screen) prevent them from leaving unless consenting to losing the changes.

Describe the solution you'd like
A clear and concise description of what you want to happen.

  • Add some sort of app level component that can have some state change via a prop function / context function to tell that component to give the user an alert popup (probably via browser internal alert() due to JS limitations) to consent to wanting to leave the page if pending state not saved.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

@ohdzdev ohdzdev added the enhancement New feature or request label May 15, 2019
@ColinKrist ColinKrist added the Frontend Deals with presentation of web in some way shape or form label May 17, 2019
@ColinKrist
Copy link
Collaborator

possible solution for nextjs: https://nextjs.org/docs#intercepting-popstate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Frontend Deals with presentation of web in some way shape or form Priority: Low
Projects
None yet
Development

No branches or pull requests

2 participants