This submits the project form when navigating away from the page, with the goal of not requiring users to click the Save Project button when editing. That includes going to a different page and closing the tab.
Closes #221
Notes
The only use case that behaves strangely is saving when refreshing the page. It does run the validation and make the change server-side when refreshing, but does not reflect the change client-side when done. I tried to manipulate the method and the timing of fetch's redirect when refreshing, but that didn't work consistently.
I'm not sure how often folks would be refreshing the page after making a change, but if you have any ideas I'm absolutely open!
Testing Instructions
Navigate to a project detail page
Edit some fields correctly and navigate away from the page
Return to the page to confirm that the new values have been saved
Edit some fields incorrectly and navigate away from the page
Confirm that a warning about unsaved changes appears, and upon clicking cancel, form errors are displayed as if you had clicked the Save Project button
Overview
This submits the project form when navigating away from the page, with the goal of not requiring users to click the Save Project button when editing. That includes going to a different page and closing the tab.
Closes #221
Notes
The only use case that behaves strangely is saving when refreshing the page. It does run the validation and make the change server-side when refreshing, but does not reflect the change client-side when done. I tried to manipulate the method and the timing of fetch's redirect when refreshing, but that didn't work consistently.
I'm not sure how often folks would be refreshing the page after making a change, but if you have any ideas I'm absolutely open!
Testing Instructions