Closed mikekauffman closed 9 years ago
@mikekauffman the form is getting reset every time it's dismissed (presumably to clear the values after a successful create). We should move these lines
into this callback
@wookiehangover I didn't know if we wanted to distinguish between clicking outside the modal to dismiss and save the input values, and clicking cancel to dismiss and clear the values. To clarify, it sounds like you want the values to persist in both cases?
@mikekauffman the main workflow I want to achieve is typing some content into the modal, dismiss it (either by clicking cancel, clicking the background, or hitting escape), and have your content come back when you open the modal again.
@mikekauffman bump on this
@wookiehangover should be good to go. The necessary logic was already being called in the create success block here. Removed it from the cancel block.
What's this PR do?
Stores add-item modal form values in local storage so users don't lose their data if they close the modal.
Which code should the reviewer start with?
app/views/components/add-item-modal.js
How is this feature tested (either manually or automatically)?
Fill out the various fields in the add-item modal and click outside the modal. Reopening the modal will display the original input values.
What are the relevant tickets (please include link(s))?
Delivers #9859 https://sprint.ly/product/1/item/9859
What gif best describes this PR or how it makes you feel?