You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apologies if this is an easy thing to do, but I'm struggling to find an answer in the Issues and it didn't seem obvious to me, but how can I handle removing or adding a selection if the API call fails. To give some background, when a selection is made or removed, we make the REST call to add or remove from the backend. If the REST call fails, the item is still in the selectize box, because it adds it to the UI/input field before the rest call completes. I feel like I must be missing something, but basically, is there a way to add the selection to the UI only after the REST call has been made? For reference, I am doing a model.save() when a selection is made. I tried to handle it in the error callback, but element is already added to the UI at the point, so I feel like I am missing something. Thanks.
The text was updated successfully, but these errors were encountered:
Apologies if this is an easy thing to do, but I'm struggling to find an answer in the Issues and it didn't seem obvious to me, but how can I handle removing or adding a selection if the API call fails. To give some background, when a selection is made or removed, we make the REST call to add or remove from the backend. If the REST call fails, the item is still in the selectize box, because it adds it to the UI/input field before the rest call completes. I feel like I must be missing something, but basically, is there a way to add the selection to the UI only after the REST call has been made? For reference, I am doing a model.save() when a selection is made. I tried to handle it in the error callback, but element is already added to the UI at the point, so I feel like I am missing something. Thanks.
The text was updated successfully, but these errors were encountered: