Many of the DataStore components (such as Kanban and others) have the ability to save data back to a server using either a URL or a custom function.
But, I can’t find any way for that to fail and have it display properly in the UI.
So, if a user performs an operation, lets say moves something in the Kanban and the update to the server fails, then the user doesn’t see any change. The board just looks the same.
For example:
{
view: 'kanban', id: 'board',
cols: [
{
header: 'Planning',
body: { view: 'kanbanlist', status: 'S_0', type: 'cards' }
},
{
header: 'Booking',
body: { view: 'kanbanlist', status: 'S_10', type: 'cards' }
},
],
save: {
trackMove: true,
update: function (id, operation, update) {
//Send to server using custom API
//What if this fails? there is no way to trigger UI to undo
}
},
}
If the customer API fails, even for normal reasons like Permissions or Missing data, or other business rule. then there appears to be no way to revert the UI.
Am I missing something?