-
-
Notifications
You must be signed in to change notification settings - Fork 109
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
possible race condition: unicorn:model
looses data when saved too quickly.
#684
Comments
unicorn:model
looses data when saved too quickly.
My hypothesis has been that multiple requests are getting sent and come back from the server in a different order, so forcing requests into a queue was my attempt to solve for this. Have you tried enabling serial? I have always felt like there should be a more elegant solution in the JavaScript of |
Especially when connections are slow, but even on localhost, the model is not fast enough to send the data to the backend, when the model saving method is called shortly after the last keypress. See this example:
When you run that component, write a longer string like "sdhfkjhdsfkjhkjdsf" and quickly press Enter, the saved model's name field will only contain approximately "sdhfkjhds".
I want to use unicorn for "inline" editing - a
<input>
replaces the text when inedit_mode
and is saved automatically if in any of the input fields the user presses Enter. A quick and responsive UI is important, and data loss is very bad, in any case.The text was updated successfully, but these errors were encountered: