Skip to content

Commit ed1826f

Browse files
committed
[update] add missing methods to dataprocessor page
1 parent 9e49001 commit ed1826f

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

data/api/gantt_dataprocessor_other.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,37 @@ dp.setUpdated(2, true, "deleted");
159159
~~~
160160
</ul>
161161

162+
<ul id="getSyncState">
163+
<li>
164+
<b class="submethod">getSyncState (): boolean</b> - returns the state of DataProcessor (<i>true</i> when all data is saved)
165+
</li>
166+
</ul>
167+
168+
<ul>
169+
~~~js
170+
var state = dp.getSyncState();
171+
~~~
172+
173+
<p>If some records haven't been saved yet, or have received an "error" response, the method will return <i>false</i>.</p>
174+
</ul>
175+
176+
<ul id="sendData">
177+
<li>
178+
<b class="submethod">sendData ([id]): void</b> - sends all the data which aren't saved to the server side yet
179+
<ul>
180+
<li><b><i>id</i></b> - (<i>string | number</i>) - optional, the id of an item</li>
181+
</ul>
182+
</li>
183+
</ul>
184+
185+
<ul>
186+
~~~js
187+
dp.sendData();
188+
~~~
189+
190+
<p> If an ID is provided, only one item will be sent to the server side.</p>
191+
<p> When called without parameters, the method will send all the items that aren't saved yet.</p>
192+
</ul>
162193

163194

164195
<h3 id="events">Events</h3>

0 commit comments

Comments
 (0)