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

React data not updating after batchRequest with DataManager

Hi!

I'm using the React Gantt component with the DataManager and a CustomAdaptor.

The issue is that when I add a new task, my server recieves it correctly and responds, but the Gantt doesn't update. After refreshing the page, the new tasks appear correctly.

I uploaded the files that I deem relevant.

Thanks 






Attachment: files_72ad23d2.zip

1 Reply

MS Monisha Sivanthilingam Syncfusion Team December 12, 2022 06:51 AM UTC

Hi Alejandro,


Greetings from Syncfusion support.


We have analyzed the code files you have shared and have made some changes to the processResponse method in the Custom Adaptor. The below code snippets demonstrate the solution.


 

processResponse(dm, query, hierarchyFilters) {

  var original = super.processResponse.apply(this, arguments);

  if(dm.count !== undefined){

    return { result: original.result, count: original.count };

  } else {

    return original;

  }

}

 


Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/421870-171498612


Regards,

Monisha.


Loader.
Live Chat Icon For mobile
Up arrow icon