Dear Team!
I have implemented a custom batchRequest in the ODataV4Adaptor like this:
load() {
const adaptor = new ODataV4Adaptor();
adaptor.batchRequest = (dm: DataManager, changes, e, query: Query, original) => {
const updatedRecords = changes.changedRecords;
return {
type: "PUT",
url: `${environment.ApiBackendBaseUrl}api/Vehicle/discontinued/update`,
contentType: "application/json; charset=utf-8",
data: JSON.stringify(updatedRecords)
};
}
this.data = new DataManager({
url: this.baseUrl + 'odata/GetAllDiscontinuedVehicles',
adaptor: adaptor,
dataType: 'Vehicle',
headers: [{ Authorization: 'Bearer ' + this.accessToken }],
});
}
The request succeeds, i get a 200 back, but the grid spinner is still there and it doesn't become "saved", The edited cells remain green, the Update button is still enabled.
What am I doing wrong?
Thank you.