fpdcc / ccfp-asset-dashboard

CCFP Asset Dashboard
0 stars 1 forks source link

Submit project form when navigating away from page #253

Closed xmedr closed 11 months ago

xmedr commented 11 months ago

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