Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Display a warning message when navigating from an unsaved form in React

.
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 28, 2018

Hi,
In JIRA, a warning message appears when trying to navigate away from the current page with unsaved data entered into a form. This behaviour is exactly like what I am trying to achieve but unfortunately, there is an open issue with the Prompt component in the react-router-dom (https://github.com/ReactTraining/react-router/issues/5405). The issue prevents the browser's back button from behaving correctly and changes the URL even when the user cancels the navigation.
This scenario has been rather tricky and I haven't been able to find a solution or any solid examples of it working in React so it would be greatly useful if someone could possibly advise how to achieve this behaviour. Any general tips would also be much appreciated

Regards,
Patrick

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, loom, loom for training, loom for teaching, video training, async learning, online education, screen recording, loom tutorials, loom use cases, atlassian learning, team training tools, instructional video, virtual training tools

🛗 Elevate Your Training and Enablement with Loom

Join us June 26, 11am PT for a webinar with Atlassian Champion Robert Hean & Loom’s Brittany Soinski. Hear tips, stories, and get your burning questions answered. Learn how Loom makes training and enablement easier. Don’t miss it!

Register today
AUG Leaders

Atlassian Community Events