Skip to content

Commit 307d8a6

Browse files
committed
Merge branch 'next' into grid-column-properties-guide-4802
2 parents 4c386ec + 8084ec3 commit 307d8a6

File tree

56 files changed

+1751
-855
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1751
-855
lines changed
21.7 KB
Loading
55.6 KB
Loading
77.7 KB
Loading

docs/assets/grid/row_expander.png

51.7 KB
Loading
38.2 KB
Loading

docs/chart/customization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ const chart = new dhx.Chart("chart_container", {
252252

253253
**Related sample**: [Chart. Value template](https://snippet.dhtmlx.com/o7ke2f1s)
254254

255-
When you need to show values for data items on the Pie, Pie3D and Donut charts, you can use the **valueTemplate** option of [series](chart/configuration_properties.md#the-list-of-config-options-for-series-for-charts-without-scales-pie-pie3d-donut) to specify the necessary template function. For example:
255+
When you need to show values for data items on the Pie, Pie3D and Donut charts, you can use the **valueTemplate** option of [series](chart/configuration_properties.md/#pie-pie-3d-and-donut-chart) to specify the necessary template function. For example:
256256

257257
~~~jsx {6-8}
258258
const chart = new dhx.Chart("chart_container", {

docs/data_collection/api/datacollection_filter_method.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ description: You can explore the filter method of DataCollection in the document
1414
- `rule: function | object` - the filtering criteria
1515
- 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*
1616
- If set as an *object*, the parameter has the following attributes:
17-
- `by: string | number` - mandatory, the id of a data field (the column of Grid)
17+
- `by: string | number` - mandatory, the id of a data field
1818
- `match: string` - mandatory, a pattern to match
1919
- `compare: function` - optional, a function for extended filtering that takes three parameters:
20-
- `value` - the value to compare (e.g. a column in a row for Grid)
20+
- `value` - the value to compare
2121
- `match` - a pattern to match
22-
- `item` - a data item the values of which should be compared (e.g. a row)
22+
- `item` - a data item the values of which should be compared
2323
- `config: object` - optional, defines the parameters of filtering. It may contain the following properties:
2424
- `id: string` - optional, the id of the filter
2525
- `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)

docs/data_collection/api/datacollection_foreach_method.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ description: You can explore the forEach method of DataCollection in the documen
1111
@signature: {'forEach(callback: (item: object, index?: number, array?: object[]) => any): void;'}
1212

1313
@params:
14-
- `callback: function` - a function that will iterate over items of a data collection. The function takes three parameters:
15-
- `item` - (required) the object of an item
16-
- `index` - (optional) the index of an item
17-
- `array` - (optional) an array with items
14+
- `callback: function` - a function that will iterate over items of a data collection. The function is called with the following parameters:
15+
- `item` - the object of an item
16+
- `index` - the index of an item
17+
- `array` - an array of items the method was called upon
1818

1919
@example:
2020
component.data.forEach(function(item, index, array) {

docs/data_collection/api/datacollection_getfilters_method.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ description: You can explore the getFilters method of DataCollection in the docu
1515
- `permanent: boolean` - optional, <i>false</i> by default. Allows getting the list of permanent filters
1616

1717
@returns:
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)
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)
1919

2020
@example:
2121
const filters = grid.data.getFilters();
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
sidebar_label: getSortingStates()
3+
title: JavaScript DataCollection - getSortingStates Method
4+
description: You can explore the getSortingStates method of DataCollection in the documentation of the DHTMLX JavaScript UI library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Suite.
5+
---
6+
7+
# getSortingStates()
8+
9+
@short: returns an array of objects with the current parameters of sorting applied to the data
10+
11+
## Usage
12+
13+
~~~jsx
14+
interface ISortingState {
15+
by: string | number,
16+
dir: "asc" | "desc",
17+
as?: (a) => any,
18+
rule?: (a, b) => number,
19+
smartSorting?: boolean
20+
}
21+
22+
getSortingStates(): ISortingState[];
23+
~~~
24+
25+
@returns:
26+
An array of objects with the current parameters of sorting applied to the data.
27+
28+
@example:
29+
const state = grid.data.getSortingStates();
30+
// -> [{by: "country", dir: "desc"}, {by: "population", dir: "desc"}]
31+
32+
@descr:
33+
The array returned by the method contains objects with the following properties:
34+
35+
<table>
36+
<tbody>
37+
<tr>
38+
<td><b>by</b></td>
39+
<td>(<i>string | number</i>) the id of a data field to sort by</td>
40+
</tr>
41+
<tr>
42+
<td><b>dir</b></td>
43+
<td>(<i>string</i>) the direction of sorting: "asc" or "desc"</td>
44+
</tr>
45+
<tr>
46+
<td><b>as</b></td>
47+
<td>(<i>function</i>) optional, a custom function of converting values before comparing</td>
48+
</tr>
49+
<tr>
50+
<td><b>rule</b></td>
51+
<td>(<i>function</i>) optional, a custom sorting function</td>
52+
</tr>
53+
<tr>
54+
<td><b>smartSorting</b></td>
55+
<td>(<i>boolean</i>) optional, (if applied) specifies whether a sorting rule should be applied each time after changing the data set</td>
56+
</tr>
57+
</tbody>
58+
</table>
59+
60+
@changelog:
61+
added in v9.1

0 commit comments

Comments
 (0)