On creating task, prevent task from adding to gantt on from but allow to call api

I am trying to add a gantt task, so while adding I am calling an api as:

let dp = gantt.createDataProcessor({
       task: {
           create: function(data) {
                //callGanttApi is just an api calling function
               callGanttApi("gantt-chart/task/create", data, 'post', gantt);
           },
       },
       link: {
           create: function(data) {},
           update: function(data, id) {},
           delete: function(id) {}
       }
   });

This api will just create new task on server, and return data with other custom column’s data and add it successfully at the end of the task list, however, on frontend also, it is adding this new task by itself, is it possible to prevent it from adding on front itself, but still allows to call the api?

Hello,
The code you shared only creates the Data Processor. It will be used only when you create a new task in Gantt with the “+” button or with the addTask and createTask methods.
It shouldn’t create additional task in Gantt after receiving a successful response from the server.

Probably, the issue is related to the Gantt configuration, but it is hard to suggest what might be wrong as I don’t see your code.
Please add your configuration to the following snippet and make sure that the issue is reproduced there:

Then, click on the Save button and send me the link.
Or send me a ready demo with all the necessary JavaScript and CSS files so that I can reproduce the issue locally.

If you want to create a new task on the server, you can directly call the callGanttApi function.

1 Like

@ramil could you please help me on this Gantt Redo Undo not working

Hello,
It is not necessary to ask about answering the question in a different topic. After some time, someone from the support team will respond to your questions.
If you have the Pro version, you can submit a support request via email. Support requests have a higher priority than the questions on the forum and below documentation articles.

yes i do have a pro version, actually I am one of the dev, working on company who own the liscence, if I go to contact form, it shows three options, and if I click on technical questions, it shows, we can directly send email, however, I couldn’t find where the email is.

Hello,
You can find the email in the letter with the license. The person who purchased Gantt should have received that. It has the link to download Gantt as well as the email to submit support requests.