We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Unchanged data disappears after row data update with extended OdataV4Adaptor

Hi Team,

I'm using ODataV4Adaptor as the data adaptor for grid for CRUD operations.

It needs to add additional headers in the http request, so the adaptor is extended and the beforeSend method has been overridden in order to modify request headers.

Then, if a Patch (update) request is initiated, the unchanged data in the row cell disappears.



Issue can be reproduced in below stackblitz sample. 

https://stackblitz.com/edit/syncfusion-angular-editable-grid-np2bfz?file=app.component.ts


However, if the overridden method 'beforSend' is commented out, grid works as expected.


Seeking support to solve this issue.


Thanks,

Aruna.


3 Replies 1 reply marked as answer

PS Pavithra Subramaniyam Syncfusion Team April 6, 2023 06:11 AM UTC

Hi Aruna,


Thanks for contacting Syncfusion support.


In the shared sample, the reported scenario can be reproduced with or without the beforeSend customization. However, this has been working fine in our latest version 21.1.38. So please update your packages to the latest version to overcome the reported issue. Please refer to the below sample link for more information.


https://stackblitz.com/edit/angular-wmmmdc-1uz1nn?file=src%2Fapp.component.ts


https://helpej2.syncfusion.com/angular/documentation/common/how-to/update-npm-package


Please get back to us if you need further assistance.


Regards,

Pavithra S



AR Aruna replied to Pavithra Subramaniyam April 7, 2023 05:06 PM UTC

Hi  Pavithra,

I have upgraded the packages to the latest version (21.1.38). But issue still exists.

I am still able to reproduce issue. Please see below sample link. 

https://stackblitz.com/edit/angular-wmmmdc-4c4tww?file=src/app.component.ts




Thanks,

Aruna



PS Pavithra Subramaniyam Syncfusion Team April 10, 2023 12:01 PM UTC

Aruna,


While performing the PATCH update with OdataV4Adaptor, we need to return the modified entity to the client which will be updated to the current edited row. While sending the “Authorization” header, we could see that the response is 204-No content which is the cause of the issue. While using the default OdataV4Adaptor, you have returned the entity correctly which is why the row is updated properly. So please return the entity from the server to overcome the reported issue.


Marked as answer
Loader.
Up arrow icon