-
Notifications
You must be signed in to change notification settings - Fork 576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Prevent submitting a form before saving an input into the store #1030
fix: Prevent submitting a form before saving an input into the store #1030
Conversation
Great stuff @pboi20! I haven't tested this yet, however reviewing the code I'm asking myself what happens for the end user. Should the submit button be disabled when |
Hey @ifox, good point! At the moment, there is no visual feedback as part of this implementation. Curious to know your first impression! The WYSIWYG fields have a slower debounce time (600ms), which would cause less "flashing". |
Another option would be to "defer" the request to submit until the store has been updated, instead of simply ignoring it. I believe this would remove the need for any visual feedback on the disabled state. |
I personally like the "defer" better than the visual feedback. |
I think that might be a better option, I like it! Thanks for prototyping the visual feedback idea, I'm afraid the flashing isn't working. |
Hey @ifox and @antonioribeiro, I've got a first draft of the deferred/delayed submit feature. The API is relatively simple:
A Leaving this as a draft for now to take some time to test more extensively. Curious to know what you think! |
This looks great @pboi20! I will give it a try. |
Description
To summarize the issue: In the create modal as well as in the main form view, when a user types into an input field and very quickly presses enter or clicks the 'Update' button, the submit event is handled before the updated value makes its way into the Vuex store.
I'm not 100% sure this is the right approach, so I've limited this to
TextField
for now. This could easily be extended toWYSIWYG
and other fields that may be affected by this issue.Related Issues
#1029 (comment)
#777 (comment)