I'm submitting a bug report
When you sort a column in the spreadsheet, enter data, and then trigger the data source's sync method, the data source will send incorrect data to it's transport function. It acts as if you entered data and the columns haven't been sorted yet.
The data source should take into account column sorting for keeping track of changes.
Minimal reproduction of the problem with instructions
- Open this sample code
- Once the page loads, sort the first ("ID") column from Z to A.
- Enter any value in the empty C2 cell (should be the row with ID = 3)
- Click the "SAVE" button at the top to call the data source's sync() method.
- Look at the console output, which shows what the data source has tracked as changed. (options.data.updated)
- Observe that the value of options.data.updated shows that the row with ID = 1 has been updated, rather than the row with ID = 3, which is shown in the UI.
Apologies if I have misunderstood how the data source is suppose to work.