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
+9-4Lines changed: 9 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,18 +12,23 @@ 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
+16-10Lines changed: 16 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,22 +8,28 @@ description: You can explore the filter method of DataCollection in the document
8
8
9
9
@short: filters data items in a component
10
10
11
-
@signature: {'filter(rule?: function | object, config?: object): string;'}
11
+
@signature: {'filter(rule?: function | object, config?: object, silent?: boolean): string;'}
12
12
13
13
@params:
14
-
-`rule: function | object` - the filtering criteria
15
-
- If set as a *function*, filtering will be applied by the rule specified in the function. The function takes an object of a data item as a parameter and returns *true/false*
14
+
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*
16
17
- If set as an *object*, the parameter has the following attributes:
17
-
-`by: string | number` - mandatory, the id of a data field
18
-
-`match: string` - mandatory, a pattern to match
19
-
-`compare: function` - optional, a function for extended filtering that takes three parameters:
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:
20
21
-`value` - the value to compare
21
22
-`match` - a pattern to match
22
23
-`item` - a data item the values of which should be compared
23
-
-`config: object` - optional, defines the parameters of filtering. It may contain the following properties:
24
-
-`id: string` - optional, the id of the filter
25
-
-`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)
26
-
-`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
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
29
+
30
+
:::info
31
+
Note that after calling the method with the `silent:true` parameter, you may need to repaint the component with the `paint()` method.
Copy file name to clipboardExpand all lines: docs/data_collection/api/datacollection_getfilters_method.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ description: You can explore the getFilters method of DataCollection in the docu
12
12
13
13
@params:
14
14
15
-
-`permanent: boolean` - optional, <i>false</i> by default. Allows getting the list of permanent filters
15
+
-`permanent?: boolean` - optional, *false* by default. Allows getting the list of permanent filters
16
16
17
17
@returns:
18
18
-`filters: object` - an object with the applied filters, where the key is the id of a filter and the value is an object with the [`rule` and `config` properties](data_collection/api/datacollection_filter_method.md)
0 commit comments