Skip to content

Commit 91fabdb

Browse files
committed
[update] colWidth renamed to columnWidth, whats_new updated
1 parent df038fd commit 91fabdb

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

docs/api/config/columnshape-property.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ columnShape?: {
3636
- `autoWidth` - (optional) an object that defines how column width should be calculated automatically. The default configuration uses 20 rows, and the width is calculated based on the header and data, with each field analyzed only once. The object parameters are the following:
3737
- `columns` - (optional) an object where each key is a field id and the boolean value defines whether column width should be calculated automatically
3838
- `auto` - (required) if set to **header**, adjusts the width to the header text; if set to **data**, adjusts the width to the cell with the widest content; if set to **true**, the width is adjusted to the content of both headers and cell.
39-
If autowidth is set to **false**, the `width` value is set or the value of the `colWidth` from the [`tableShape`](/api/config/tableshape-property) property is applied.
39+
If autowidth is set to **false**, the `width` value is set or the value of the `columnWidth` from the [`tableShape`](/api/config/tableshape-property) property is applied.
4040
- `maxRows` - (optional) the number of rows to be processed for the autoWidth calculation
4141
- `firstOnly` - (optional) if set to **true** (default), each field of the same data is analyzed only once to calculate the column width; in case of multiple columns based on the same data (e.g., the *oil* field with the *count* operation and the *oil* field with the *sum* operation), only data in the first one will be analyzed and the others will inherit this width
4242

docs/api/config/tableshape-property.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ tableShape?: {
3030
sizes?: {
3131
rowHeight?: number,
3232
headerHeight?: number,
33-
colWidth?: number,
33+
columnWidth?: number,
3434
footerHeight?: number
3535
},
3636
tree?:boolean,
@@ -54,7 +54,7 @@ tableShape?: {
5454
- `rowHeight` - (optional) the row height in the Pivot table in pixels; the default value is 34
5555
- `headerHeight` - (optional) the header height in pixels; the default value is 30
5656
- `footerHeight` - (optional) the footer height in pixels; the default value is 30
57-
- `colWidth` - (optional) the column width in pixels; the default value is 150
57+
- `columnWidth` - (optional) the column width in pixels; the default value is 150
5858
- `cellStyle` - (optional) a function that applies a custom style to a cell; the function has the next parameters:
5959
- `field` - (required) a string representing the field name for which the style is applied
6060
- `value` - (required) the value of the cell (the actual data for that particular row and column)

docs/api/events/render-table-event.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ The callback of the action takes the `config` object with the following paramete
4545
- `template` - (optional) the template that is defined via the [`tableShape`](/api/config/tableshape-property) property
4646
- `data` - (optional) an array of objects with data for the table; each object represents a row
4747
- `footer` - (optional) if it's set to **true**, the table footer is displayed at the bottom of the table; it's set to **false** and invisible by default
48-
- `sizes` - (optional) an object with table sizes settings, namely, colWidth, footerHeight, headerHeight, rowHeight
48+
- `sizes` - (optional) an object with table sizes settings, namely, columnWidth, footerHeight, headerHeight, rowHeight
4949
- `split` - (optional) the number of columns to be fixed from the left during the scrolling process
5050
- `tree` - (optional) the boolean value with the tree mode setting (**true** if the tree mode is enabled)
5151
- `cellStyle` - (optional) an object where each key is the field id and the value is a function that returns a string. All columns based on the specified field will have the related template applied.

docs/guides/configuration.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const sizes = {
4040
rowHeight: 34,
4141
headerHeight: 30,
4242
footerHeight: 30,
43-
colWidth: 150
43+
columnWidth: 150
4444
};
4545
~~~
4646

@@ -55,7 +55,7 @@ const table = new pivot.Pivot("#root", {
5555
rowHeight: 44,
5656
headerHeight: 60,
5757
footerHeight: 30,
58-
colWidth: 170
58+
columnWidth: 170
5959
}
6060
},
6161
config: {
@@ -639,3 +639,4 @@ In this snippet you can see how to apply templates to the Pivot cells:
639639
- [Pivot 2. Expand and collapse all rows](https://snippet.dhtmlx.com/i4mi6ejn)
640640
- [Pivot 2. Frozen(fixed) columns on the left and right](https://snippet.dhtmlx.com/lahf729o)
641641
- [Pivot 2. Custom frozen (fixed) columns (your number)](https://snippet.dhtmlx.com/53erlmgp)
642+

docs/news/whats-new.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@ Released on ...
1515
### New functionality
1616

1717
- [Ability to freeze columns on the right](/guides/configuration/#freezing-columns)
18-
- [Numbers are formatted](/guides/localization/#number-formatting) according to the current locale with possibility to define custom number formats within templates
18+
- [Numbers are formatted](/guides/localization/#number-formatting) according to the current locale with possibility to define custom number formats within templates. `format` added to the [`fields`](/api/config/fields-property) property
1919
- [Ability to change the number alignment in a cell](/guides/stylization/#aligning-numbers-in-a-cell)
2020
- [Ability to style cells](/guides/stylization/#cell-style)
21-
- `format` added to the [`fields`](/api/config/fields-property) property
2221
- Text fields and numbers are exported as they are seen in grid cells. If a template is applied to a cell, the rendered value is exported.
2322
- Cell navigation with a focus frame
2423

@@ -28,6 +27,10 @@ Released on ...
2827
- Values are converted to numbers during export
2928
- Predicate template is not applied to rows/columns
3029

30+
### Breaking changes
31+
32+
- `colWidth` parameter of the `sizes` object in the `tableShape` property renamed to `columnWidth`
33+
3134
## Version 2.0.3
3235

3336
Released on November 29, 2024

0 commit comments

Comments
 (0)