feat(frontend): warn if notes are dirty#11772
feat(frontend): warn if notes are dirty#11772SchrodingersGat merged 6 commits intoinventree:masterfrom
Conversation
✅ Deploy Preview for inventree-web-pui-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Nice addition, we may can use the useBlocker hook from react router here to block at the router level to ensure no other navigation on a different link occurs. We may can also block closing the tab when there is unsaved data |
|
This is a great addition! The |
…feat(frontend)--warn-if-notes-are-dirty
|
@wolflu05 useBlocker does not work with our router model / react router version. |
|
i think i got this as far as I can without touching the router - which i am not intrested in |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #11772 +/- ##
==========================================
+ Coverage 91.28% 91.35% +0.06%
==========================================
Files 970 967 -3
Lines 50325 50201 -124
==========================================
- Hits 45941 45862 -79
+ Misses 4384 4339 -45
🚀 New features to boost your workflow:
|
|
Oh, you're right. I haven't used React Router for a while. It seems that they have different modes now, which I was not aware of. |

This adds an alert if the user tries to navigate away after changing the content of a panel - for now only notes.
closes invenhost#301