Error while refreshing the data source

Hi Syncfusion,


We have an error while refreshing the data source in the Gantt Chart.


Our application behavior is as follows:

1. Taskbar is edited (moved, resized)

2. The Client sends a request to the server, to change the specific task data

3. The Server decides whether the changes are possible, corrects them if necessary, and responds with an information about the data changes

4. The Client handles the Server's response by setting that data update is required and forcing the GanttComponent parent to update

5. When GanttComponent parent is re-rendered, it checks if a data update is needed and passes the updated datasource to GanttComponent


Everything works fine, but we get an error every now and then:


We prepare a sample that maps the behavior of our application.

The MockingServer component mocks our server behavior, but it is fairly simple, and when the client requests changes to the task, it replies with the original data set.

To reproduce the error, you need to move the child taskbar several times. Sometimes the error occurs after the first move, sometimes after a few moves.

This is a video showing you how to reproduce the bug.



10 Replies

PS Premkumar Sudalaimuthu Syncfusion Team February 25, 2022 03:33 PM UTC

Hi enova, 
  
Yes, the reported issue has been replicated. We need time to validate and will share further details within two business days on 1st March 2022. Until then we appreciate your patience. 
  
Regards, 
Premkumar S 
  



PS Premkumar Sudalaimuthu Syncfusion Team March 1, 2022 01:11 PM UTC

Hi enova,  
  
We suspect that the issue occurs may be due to the asynchronous call of your sample. We need more details to understand what you are trying in your workaround so that we can able to provide a alternate solution or proper solution for your requirement, Please share us below details.  
  
1. Whether you are trying to refresh the whole data while editing the taskbar.  
2. Whether you are trying to restrict the taskbar editing alone.  
3. Whether you are trying to assign a new data source while taskbar editing.  
  
Regards,  
Premkumar S  



EN enova March 3, 2022 12:18 PM UTC

Hi Syncfusion,


We think that the 3rd option is the closest to our case.


After any kind of editing on GanttChart (not during editing), we need to inform our server, which can respond with a new data set, when this happens we handle the server's response by assigning a new data source to GanttComponent.


Regards,
Enova



LA Lokesh Arjunan Syncfusion Team March 3, 2022 01:02 PM UTC

Hi enova 
 
We analyzed further and we can able to refresh the datasource in taskbarEdited event, as you mentioned. We believe you're trying to restrict the taskbar editing actions. So we suggest instead of refreshing the datasource after the taskbar is edited, we recommend using the taskbarEditing event to restrict taskbar editing by setting cancel property as true. We have prepared a sample for your reference. 
 
 
Index.js 
onTaskbarEditing(args) { 
    args.cancel = true; 
  } 
 
 
Note: If above code snippet does not meet your needs, then we would like to schedule a call with you. 
 
Regards, 
Lokesh 
 



EN enova March 3, 2022 07:59 PM UTC

Hi Syncfusion,


This solution doesn't fully meet our needs, because after editing the task, we have to inform the server what changes the user wants, and the server always responds with a new set of data. If the user changes are accepted, the new dataset includes these changes, if they are not accepted, the new dataset is corrected.

After the server responds, we need to assign new data set.


But we think we can solve the problem by slightly modifying your suggestion.


private onTaskbarEditing(args: any) {
    this.editingFields = {
      startDate: args.editingFields.startDate,
      endDate: args.editingFields.endDate
    };
    args.cancel = true;
}


onTaskbarEdited(args) {
    switch (args.taskBarEditAction) {
      case 'RightResizing':
      case 'LeftResizing':
      case 'ChildDrag':
        this.postAction('resize', [
          `${args.data.TaskID}`,
          `${this.editingFields.startDate}`,
          `${this.editingFields.endDate}`,
        ]);
        break;
      case 'ProgressResizing':
        break;
    }
  }


Regards,
Enova



PS Premkumar Sudalaimuthu Syncfusion Team March 4, 2022 07:31 AM UTC

Hi enova , 
 
We are happy and hope that you have achieved your requirement. Please contact us if you have any further queries. 
 
Regards, 
Premkumar S 



LT Lorena Tamayo July 3, 2023 07:22 PM UTC

Hi syncfusion team,


Unfortunately we have run into the same bug reported in this ticket, but it also causes the persistence of the tooltips when the bug occurs.

84c30616-3291-41a0-9c61-dfeda148e788.png

 Can you help us? We tried the solutions you provided above but it doesn't fully meet our needs


Attachment: gantt_taskbar_3cc157cc.rar


UA Udhayakumar Anand Syncfusion Team July 5, 2023 01:16 PM UTC

Enova,


We have reviewed your query, but we are unable to replicate the issue that you’ve reported, could you please share following information for us to validate further


  1. Version of the Gantt that you’ve been using
  2. Anyother customization that you’ve used to render the Gantt
  3. Have you customized your server side after the work around
  4. Could you please modify the given sample and replicate the issue which will be helpful for us to validate further


Sample Link : https://stackblitz.com/edit/react-1aasck-ga9pjb?file=index.js


Regards,

Udhayakumar



LT Lorena Tamayo July 7, 2023 10:42 PM UTC

Hello Udhayakumar

We have replicated the case in the example you sent us and added a video for your reference, currently we use versions higher than 20.4.48 and we have tried disabling tooltips, absorbing functionality and canceling the onTaskbarEditing event but none of these options are enough because we have encountered this error again.

https://stackblitz.com/edit/react-1aasck-hbf79g?file=index.js

Could you help us?

Thanks and regards,

Lorena T.


Attachment: gantt_data_source_af56fca5.rar


UA Udhayakumar Anand Syncfusion Team July 10, 2023 01:09 PM UTC

Hi Loreno,


We have thoroughly reviewed your query and this issue occurs only on old version but not on the newer version, we attempted to replicate the issue using the latest version. However, we were unable to reproduce the problem, even after disabling the tooltip functionality.


In order to further investigate and validate the issue, we kindly request that you provide us with the following information:


  1. Difficulties in upgrading to the latest version (v22.1.37)
  2. Version that you’re using in the sample, in which that you can replicate the issue


Regards,

Udhayakumar



Loader.
Up arrow icon