There is a regular grid and store.
Step 1. Delete existing records from the grid.
Step 2. Add records to the grid.
Then I execute store.sync.
What's going on in ExtJs:
- Function Sync starts
- In sync function starts batch function. And here we see the operations that he must perform: 'create'? 'update', and 'destroy'. each operation contains records. We can see that the records are contained in 'create' and 'destroy' action.
screen1
- From the operation are formed request. Each operation is performed separately in Ext.Ajax.request(request);
- The first "create" request is succeeds.
Then the problems begin:
When the turn of the 'destroy' operation comes, you can see that there are no records to destroy
screen2
What went wrong?
So, between the 'update' and the 'destroy', the store is additionally loaded. I think this is the problem. But what worries me is that after the store.load, the 'create' records are in place, and the 'destroy' records disappear
question from:
https://stackoverflow.com/questions/66059041/extjs-4-1-1-records-are-lost-when-destroyed-from-store-sync 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…