You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/method/updatetask.md
+29-33Lines changed: 29 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,65 +20,62 @@ description: "updates the specified task"
20
20
### Example
21
21
22
22
~~~jsx
23
-
var taskId =gantt.addTask({
24
-
id:10,
25
-
text:"Task #10",
26
-
start_date:"02-04-2013",
27
-
duration:8,
28
-
parent:1
23
+
consttaskId=gantt.addTask({
24
+
id:10,
25
+
text:"Task #10",
26
+
start_date:"2027-04-02",
27
+
duration:8,
28
+
parent:1
29
29
});
30
30
31
-
gantt.getTask(taskId).text="Task #13"; //changes task's data
32
-
gantt.updateTask(taskId); //renders the updated task
31
+
gantt.getTask(taskId).text="Task #13"; //changes task data
32
+
gantt.updateTask(taskId); //renders the updated task
33
33
~~~
34
34
35
35
### Details
36
36
37
37
:::note
38
-
The method invokes the [onAfterTaskUpdate](api/event/onaftertaskupdate.md) event.
38
+
The method invokes the [`onAfterTaskUpdate`](api/event/onaftertaskupdate.md) event.
39
39
:::
40
40
41
41
:::note
42
-
The method triggers the [DataProcessor](guides/server-side.md) if the dataProcessor is enabled.
42
+
The method triggers the [DataProcessor](api/method/dataprocessor.md) if the dataProcessor is enabled.
43
43
:::
44
44
45
45
This method should be called after modifying the task object to update the Gantt's state, repaint related UI elements, and send the changes to the backend.
46
46
47
-
Calling this method will fire the [onAfterTaskUpdate](api/event/onaftertaskupdate.md) event, which may trigger additional recalculations.
47
+
Calling this method will fire the [`onAfterTaskUpdate`](api/event/onaftertaskupdate.md) event, which may trigger additional recalculations.
48
48
49
-
If you're using the [DataProcessor](guides/server-side.md), invoking this method will prompt an **update** request to the server.
49
+
If you're using the [DataProcessor](api/method/dataprocessor.md), invoking this method will prompt an **update** request to the server.
50
50
51
-
For making visual changes that don't require saving, **use the [refreshTask](api/method/refreshtask.md) method instead**. This will repaint the task without invoking extra calculations.
51
+
For making visual changes that don't require saving, **use the [`refreshTask()`](api/method/refreshtask.md) method instead**. This will repaint the task without invoking extra calculations.
0 commit comments