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/data_collection/api/datacollection_add_method.md
+7-2Lines changed: 7 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,10 +12,15 @@ description: You can explore the add method of DataCollection in the documentati
12
12
Please note that data should be loaded into DataCollection via the `parse()` method. The `add()` method is primarily intended for loading standalone elements or small groups of elements, so its loads data slower than the `parse()` method.
Copy file name to clipboardExpand all lines: docs/data_collection/api/datacollection_filter_method.md
+14-16Lines changed: 14 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,22 +12,20 @@ description: You can explore the filter method of DataCollection in the document
12
12
13
13
@params:
14
14
15
-
<table>
16
-
<tbody>
17
-
<tr>
18
-
<td><b>rule</b></td>
19
-
<td>(<i>function | object</i>) optional, the filtering criteria. It can be:<ul><li>a filtering function. It takes as a parameter a data item and returns <i>true/false</i></li><li>an object with the following attributes:<ul><li><b>`by?: string | number`</b> - optional, the id of a column</li><li><b>`match?: string`</b> - optional, a pattern to match </li><li><b>`compare?: function`</b> - optional, a function for extended filtering that takes the following parameters:<ul><li><b>value</b> - the value to compare </li><li><b>match</b> - a pattern to match </li><li><b>item</b> - a data item the values of which should be compared</li></ul></li></ul></li></ul></td>
20
-
</tr>
21
-
<tr>
22
-
<td><b>config</b></td>
23
-
<td>(<i>object</i>) optional, an object with the following properties:<ul><li><b>`id?: string`</b> - optional, the id of the filter</li><li><b>`add?: boolean`</b> - optional, defines whether each next filtering will be applied to the already filtered data (<i>true</i>), or to the initial data (<i>false</i>, default)</li><li><b>`permanent?: boolean`</b> - optional, <i>true</i> to make the current filter permanent. It will be applied even if the next filtering doesn't have the <b>`add:true`</b> property in its configuration object. Such a filter can be removed just with the <a href="../datacollection_resetfilter_method/">`resetFilter()`</a> method</li></ul></td>
24
-
</tr>
25
-
<tr>
26
-
<td><b>silent</b></td>
27
-
<td>(<i>boolean</i>) optional, if set to <i>true</i>, the method will be called without triggering events, <i>false</i> by default</td>
28
-
</tr>
29
-
</tbody>
30
-
</table>
15
+
-`rule?: function | object` - optional, the filtering criteria
16
+
- If set as a *function*, filtering will be applied by the rule specified in the function. It takes as a parameter a data item and returns *true/false*
17
+
- If set as an *object*, the parameter has the following attributes:
18
+
-`by?: string | number` - optional, the id of a data field
19
+
-`match?: string` - optional, a pattern to match
20
+
-`compare?: function` - optional, a function for extended filtering that takes the following parameters:
21
+
-`value` - the value to compare
22
+
-`match` - a pattern to match
23
+
-`item` - a data item the values of which should be compared
24
+
-`config?: object` - optional, an object with the following properties:
25
+
-`id?: string` - optional, the id of the filter
26
+
-`add?: boolean` - optional, defines whether each next filtering will be applied to the already filtered data (<i>true</i>), or to the initial data (<i>false</i>, default)
27
+
-`permanent?: boolean` - optional, *true* to make the current filter permanent. It will be applied even if the next filtering doesn't have the `add:true` property in its configuration object. Such a filter can be removed just with the [resetFilter()](data_collection/api/datacollection_resetfilter_method.md) method
28
+
-`silent?: boolean` - optional, if set to <i>true</i>, the method will be called without triggering events, <i>false</i> by default
31
29
32
30
:::info
33
31
Note that after calling the method with the `silent:true` parameter, you may need to repaint the component with the `paint()` method.
0 commit comments