in my Ext JS application, I have a store that synchronizes its data with a remote server via the proxy's "api" configuration. This all works fine. Now, when a record gets updated in the web app and subsequently is sent to the server, the server might change some of the data and send this revised update back to the browser. The same situation is present when a new record gets created, and the server completes the record's data with a database-generated id, the current timestamp or something else. This works fine, too.
However, this behaviour causes the view to be updated two times - once when the record is updated in the browser and another time when it is updated again with the data sent back by the server. In some cases, this is visible to the user. It also makes it extremely difficult to do something like letting a freshly created record slide into the view, because its HTML element gets updated again shortly after the beginning of the animation. And there may be cases where the server may decide that the requested operation is not allowed or possible at all, for example when deleting records.
My question is: Is there a proper way to wait with the final store update until the server has sent a response? The store would need some kind of "buffer" with unconfirmed changes, which are not visible in whatever views the store is connected to until the remote side has had its final word on the requested operation.
Has anyone dealt with a similar problem before?