@vaadin/grid 25.0.0-alpha2 → 25.0.0-alpha21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/all-imports.js +1 -1
- package/package.json +12 -13
- package/src/array-data-provider.js +9 -2
- package/src/lit/column-renderer-directives.d.ts +0 -1
- package/src/styles/vaadin-grid-base-styles.d.ts +8 -0
- package/src/styles/vaadin-grid-base-styles.js +677 -0
- package/src/styles/vaadin-grid-filter-base-styles.d.ts +8 -0
- package/src/styles/vaadin-grid-filter-base-styles.js +18 -0
- package/src/styles/vaadin-grid-sorter-base-styles.d.ts +8 -0
- package/src/styles/vaadin-grid-sorter-base-styles.js +76 -0
- package/src/styles/vaadin-grid-tree-toggle-base-styles.d.ts +8 -0
- package/src/styles/vaadin-grid-tree-toggle-base-styles.js +76 -0
- package/src/vaadin-grid-a11y-mixin.js +26 -10
- package/src/vaadin-grid-column-auto-width-mixin.js +9 -6
- package/src/vaadin-grid-column-mixin.d.ts +1 -0
- package/src/vaadin-grid-column-mixin.js +1 -16
- package/src/vaadin-grid-column-reordering-mixin.js +2 -2
- package/src/vaadin-grid-data-provider-mixin.js +33 -85
- package/src/vaadin-grid-drag-and-drop-mixin.js +3 -0
- package/src/vaadin-grid-event-context-mixin.d.ts +2 -0
- package/src/vaadin-grid-event-context-mixin.js +1 -0
- package/src/vaadin-grid-filter-element-mixin.js +0 -17
- package/src/vaadin-grid-filter.js +7 -1
- package/src/vaadin-grid-helpers.js +9 -0
- package/src/vaadin-grid-keyboard-navigation-mixin.js +2 -6
- package/src/vaadin-grid-mixin.d.ts +1 -0
- package/src/vaadin-grid-mixin.js +64 -32
- package/src/vaadin-grid-row-details-mixin.js +5 -5
- package/src/vaadin-grid-scroll-mixin.js +57 -77
- package/src/vaadin-grid-selection-column-base-mixin.d.ts +1 -1
- package/src/vaadin-grid-selection-column-base-mixin.js +1 -1
- package/src/vaadin-grid-selection-column.d.ts +2 -0
- package/src/vaadin-grid-selection-column.js +2 -1
- package/src/vaadin-grid-sort-column.d.ts +2 -0
- package/src/vaadin-grid-sorter-mixin.js +0 -60
- package/src/vaadin-grid-sorter.d.ts +3 -3
- package/src/vaadin-grid-sorter.js +10 -4
- package/src/vaadin-grid-tree-column-mixin.js +2 -7
- package/src/vaadin-grid-tree-toggle-mixin.js +0 -77
- package/src/vaadin-grid-tree-toggle.d.ts +4 -4
- package/src/vaadin-grid-tree-toggle.js +13 -5
- package/src/vaadin-grid.d.ts +2 -1
- package/src/vaadin-grid.js +6 -3
- package/vaadin-grid-column-group.js +1 -1
- package/vaadin-grid-column.js +1 -1
- package/vaadin-grid-filter-column.js +1 -1
- package/vaadin-grid-filter.js +1 -1
- package/vaadin-grid-selection-column.js +1 -1
- package/vaadin-grid-sort-column.js +1 -1
- package/vaadin-grid-sorter.js +1 -1
- package/vaadin-grid-tree-column.js +1 -1
- package/vaadin-grid-tree-toggle.js +1 -1
- package/vaadin-grid.js +1 -1
- package/web-types.json +13 -13
- package/web-types.lit.json +12 -12
- package/src/vaadin-grid-styles.js +0 -389
- package/theme/lumo/all-imports.d.ts +0 -11
- package/theme/lumo/all-imports.js +0 -11
- package/theme/lumo/vaadin-grid-column-group.d.ts +0 -1
- package/theme/lumo/vaadin-grid-column-group.js +0 -1
- package/theme/lumo/vaadin-grid-column.d.ts +0 -1
- package/theme/lumo/vaadin-grid-column.js +0 -1
- package/theme/lumo/vaadin-grid-filter-column.d.ts +0 -2
- package/theme/lumo/vaadin-grid-filter-column.js +0 -2
- package/theme/lumo/vaadin-grid-filter.d.ts +0 -2
- package/theme/lumo/vaadin-grid-filter.js +0 -2
- package/theme/lumo/vaadin-grid-selection-column.d.ts +0 -2
- package/theme/lumo/vaadin-grid-selection-column.js +0 -2
- package/theme/lumo/vaadin-grid-sort-column.d.ts +0 -2
- package/theme/lumo/vaadin-grid-sort-column.js +0 -2
- package/theme/lumo/vaadin-grid-sorter-styles.d.ts +0 -3
- package/theme/lumo/vaadin-grid-sorter-styles.js +0 -52
- package/theme/lumo/vaadin-grid-sorter.d.ts +0 -2
- package/theme/lumo/vaadin-grid-sorter.js +0 -2
- package/theme/lumo/vaadin-grid-styles.d.ts +0 -6
- package/theme/lumo/vaadin-grid-styles.js +0 -405
- package/theme/lumo/vaadin-grid-tree-column.d.ts +0 -2
- package/theme/lumo/vaadin-grid-tree-column.js +0 -2
- package/theme/lumo/vaadin-grid-tree-toggle-styles.d.ts +0 -3
- package/theme/lumo/vaadin-grid-tree-toggle-styles.js +0 -81
- package/theme/lumo/vaadin-grid-tree-toggle.d.ts +0 -2
- package/theme/lumo/vaadin-grid-tree-toggle.js +0 -2
- package/theme/lumo/vaadin-grid.d.ts +0 -2
- package/theme/lumo/vaadin-grid.js +0 -2
|
@@ -3,85 +3,8 @@
|
|
|
3
3
|
* Copyright (c) 2016 - 2025 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
-
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
7
6
|
import { isFocusable } from './vaadin-grid-active-item-mixin.js';
|
|
8
7
|
|
|
9
|
-
const template = document.createElement('template');
|
|
10
|
-
|
|
11
|
-
template.innerHTML = `
|
|
12
|
-
<style>
|
|
13
|
-
@font-face {
|
|
14
|
-
font-family: "vaadin-grid-tree-icons";
|
|
15
|
-
src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAQkAA0AAAAABrwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAECAAAABoAAAAcgHwa6EdERUYAAAPsAAAAHAAAAB4AJwAOT1MvMgAAAZQAAAA/AAAAYA8TBIJjbWFwAAAB8AAAAFUAAAFeGJvXWmdhc3AAAAPkAAAACAAAAAgAAAAQZ2x5ZgAAAlwAAABLAAAAhIrPOhFoZWFkAAABMAAAACsAAAA2DsJI02hoZWEAAAFcAAAAHQAAACQHAgPHaG10eAAAAdQAAAAZAAAAHAxVAgBsb2NhAAACSAAAABIAAAASAIAAVG1heHAAAAF8AAAAGAAAACAACgAFbmFtZQAAAqgAAAECAAACTwflzbdwb3N0AAADrAAAADYAAABZQ7Ajh3icY2BkYGAA4twv3Vfi+W2+MnCzMIDANSOmbGSa2YEZRHEwMIEoAAoiB6sAeJxjYGRgYD7w/wADAwsDCDA7MDAyoAI2AFEEAtIAAAB4nGNgZGBg4GBgZgDRDAxMDGgAAAGbABB4nGNgZp7JOIGBlYGBaSbTGQYGhn4IzfiawZiRkwEVMAqgCTA4MDA+38d84P8BBgdmIAapQZJVYGAEAGc/C54AeJxjYYAAxlAIzQTELAwMBxgZGB0ACy0BYwAAAHicY2BgYGaAYBkGRgYQiADyGMF8FgYbIM3FwMHABISMDArP9/3/+/8/WJXC8z0Q9v8nEp5gHVwMMMAIMo+RDYiZoQJMQIKJARUA7WBhGN4AACFKDtoAAAAAAAAAAAgACAAQABgAJgA0AEIAAHichYvBEYBADAKBVHBjBT4swl9KS2k05o0XHd/yW1hAfBFwCv9sIlJu3nZaNS3PXAaXXHI8Lge7DlzF7C1RgXc7xkK6+gvcD2URmQB4nK2RQWoCMRiFX3RUqtCli65yADModOMBLLgQSqHddRFnQghIAnEUvEA3vUUP0LP0Fj1G+yb8R5iEhO9/ef/7FwFwj28o9EthiVp4hBlehcfUP4Ur8o/wBAv8CU+xVFvhOR7UB7tUdUdlVRJ6HnHWTnhM/V24In8JT5j/KzzFSi2E53hUz7jCcrcIiDDwyKSW1JEct2HdIPH1DFytbUM0PofWdNk5E5oUqb/Q6HHBiVGZpfOXkyUMEj5IyBuNmYZQjBobfsuassvnkKLe1OuBBj0VQ8cRni2xjLWsHaM0jrjx3peYA0/vrdmUYqe9iy7bzrX6eNP7Jh1SijX+AaUVbB8AAHicY2BiwA84GBgYmRiYGJkZmBlZGFkZ2djScyoLMgzZS/MyDQwMwLSruZMzlHaB0q4A76kLlwAAAAEAAf//AA94nGNgZGBg4AFiMSBmYmAEQnYgZgHzGAAD6wA2eJxjYGBgZACCKxJigiD6mhFTNowGACmcA/8AAA==) format('woff');
|
|
16
|
-
font-weight: normal;
|
|
17
|
-
font-style: normal;
|
|
18
|
-
}
|
|
19
|
-
</style>
|
|
20
|
-
`;
|
|
21
|
-
|
|
22
|
-
document.head.appendChild(template.content);
|
|
23
|
-
|
|
24
|
-
registerStyles(
|
|
25
|
-
'vaadin-grid-tree-toggle',
|
|
26
|
-
css`
|
|
27
|
-
:host {
|
|
28
|
-
display: inline-flex;
|
|
29
|
-
align-items: baseline;
|
|
30
|
-
max-width: 100%;
|
|
31
|
-
|
|
32
|
-
/* CSS API for :host */
|
|
33
|
-
--vaadin-grid-tree-toggle-level-offset: 1em;
|
|
34
|
-
--_collapsed-icon: '\\e7be\\00a0';
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
:host([dir='rtl']) {
|
|
38
|
-
--_collapsed-icon: '\\e7bd\\00a0';
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
:host([hidden]) {
|
|
42
|
-
display: none !important;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
:host(:not([leaf])) {
|
|
46
|
-
cursor: pointer;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
#level-spacer,
|
|
50
|
-
[part='toggle'] {
|
|
51
|
-
flex: none;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
#level-spacer {
|
|
55
|
-
display: inline-block;
|
|
56
|
-
width: calc(var(--_level, '0') * var(--vaadin-grid-tree-toggle-level-offset));
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
[part='toggle']::before {
|
|
60
|
-
font-family: 'vaadin-grid-tree-icons';
|
|
61
|
-
line-height: 1em; /* make icon font metrics not affect baseline */
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
:host(:not([expanded])) [part='toggle']::before {
|
|
65
|
-
content: var(--_collapsed-icon);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
:host([expanded]) [part='toggle']::before {
|
|
69
|
-
content: '\\e7bc\\00a0'; /* icon glyph + single non-breaking space */
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
:host([leaf]) [part='toggle'] {
|
|
73
|
-
visibility: hidden;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
slot {
|
|
77
|
-
display: block;
|
|
78
|
-
overflow: hidden;
|
|
79
|
-
text-overflow: ellipsis;
|
|
80
|
-
}
|
|
81
|
-
`,
|
|
82
|
-
{ moduleId: 'vaadin-grid-tree-toggle-styles' },
|
|
83
|
-
);
|
|
84
|
-
|
|
85
8
|
/**
|
|
86
9
|
* @polymerMixin
|
|
87
10
|
*/
|
|
@@ -44,10 +44,10 @@ export * from './vaadin-grid-tree-toggle-mixin.js';
|
|
|
44
44
|
*
|
|
45
45
|
* The following state attributes are available for styling:
|
|
46
46
|
*
|
|
47
|
-
* Attribute
|
|
48
|
-
*
|
|
49
|
-
* `expanded` | When present, the toggle is expanded
|
|
50
|
-
* `leaf`
|
|
47
|
+
* Attribute | Description
|
|
48
|
+
* -----------|-------------------------------------
|
|
49
|
+
* `expanded` | When present, the toggle is expanded
|
|
50
|
+
* `leaf` | When present, the toggle is not expandable, i. e., the current item is a leaf
|
|
51
51
|
*
|
|
52
52
|
* The following custom CSS properties are available on
|
|
53
53
|
* the `<vaadin-grid-tree-toggle>` element:
|
|
@@ -8,6 +8,8 @@ import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
|
8
8
|
import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
|
|
9
9
|
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
10
10
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin';
|
|
11
|
+
import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
|
|
12
|
+
import { gridTreeToggleStyles } from './styles/vaadin-grid-tree-toggle-base-styles.js';
|
|
11
13
|
import { GridTreeToggleMixin } from './vaadin-grid-tree-toggle-mixin.js';
|
|
12
14
|
|
|
13
15
|
/**
|
|
@@ -44,10 +46,10 @@ import { GridTreeToggleMixin } from './vaadin-grid-tree-toggle-mixin.js';
|
|
|
44
46
|
*
|
|
45
47
|
* The following state attributes are available for styling:
|
|
46
48
|
*
|
|
47
|
-
* Attribute
|
|
48
|
-
*
|
|
49
|
-
* `expanded` | When present, the toggle is expanded
|
|
50
|
-
* `leaf`
|
|
49
|
+
* Attribute | Description
|
|
50
|
+
* -----------|-------------------------------------
|
|
51
|
+
* `expanded` | When present, the toggle is expanded
|
|
52
|
+
* `leaf` | When present, the toggle is not expandable, i. e., the current item is a leaf
|
|
51
53
|
*
|
|
52
54
|
* The following custom CSS properties are available on
|
|
53
55
|
* the `<vaadin-grid-tree-toggle>` element:
|
|
@@ -64,11 +66,17 @@ import { GridTreeToggleMixin } from './vaadin-grid-tree-toggle-mixin.js';
|
|
|
64
66
|
* @mixes DirMixin
|
|
65
67
|
* @mixes GridTreeToggleMixin
|
|
66
68
|
*/
|
|
67
|
-
class GridTreeToggle extends GridTreeToggleMixin(
|
|
69
|
+
class GridTreeToggle extends GridTreeToggleMixin(
|
|
70
|
+
ThemableMixin(DirMixin(PolylitMixin(LumoInjectionMixin(LitElement)))),
|
|
71
|
+
) {
|
|
68
72
|
static get is() {
|
|
69
73
|
return 'vaadin-grid-tree-toggle';
|
|
70
74
|
}
|
|
71
75
|
|
|
76
|
+
static get styles() {
|
|
77
|
+
return gridTreeToggleStyles;
|
|
78
|
+
}
|
|
79
|
+
|
|
72
80
|
/** @protected */
|
|
73
81
|
render() {
|
|
74
82
|
return html`
|
package/src/vaadin-grid.d.ts
CHANGED
|
@@ -93,6 +93,7 @@ export type GridDefaultItem = any;
|
|
|
93
93
|
* `expanded` | Boolean | True if the item's tree sublevel is expanded.
|
|
94
94
|
* `selected` | Boolean | True if the item is selected.
|
|
95
95
|
* `detailsOpened` | Boolean | True if the item's row details are open.
|
|
96
|
+
* `hasChildren` | Boolean | True if the item has children
|
|
96
97
|
*
|
|
97
98
|
* The following helper elements can be used for further customization:
|
|
98
99
|
* - [`<vaadin-grid-column-group>`](#/elements/vaadin-grid-column-group)
|
|
@@ -102,7 +103,7 @@ export type GridDefaultItem = any;
|
|
|
102
103
|
* - [`<vaadin-grid-tree-toggle>`](#/elements/vaadin-grid-tree-toggle)
|
|
103
104
|
*
|
|
104
105
|
* __Note that the helper elements must be explicitly imported.__
|
|
105
|
-
* If you want to import everything at once you can use the `all-imports.
|
|
106
|
+
* If you want to import everything at once you can use the `all-imports.js` entrypoint.
|
|
106
107
|
*
|
|
107
108
|
* ### Lazy Loading with Function Data Provider
|
|
108
109
|
*
|
package/src/vaadin-grid.js
CHANGED
|
@@ -9,9 +9,10 @@ import { ifDefined } from 'lit/directives/if-defined.js';
|
|
|
9
9
|
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
10
10
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
11
11
|
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
12
|
+
import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
|
|
12
13
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
14
|
+
import { gridStyles } from './styles/vaadin-grid-base-styles.js';
|
|
13
15
|
import { GridMixin } from './vaadin-grid-mixin.js';
|
|
14
|
-
import { gridStyles } from './vaadin-grid-styles.js';
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
18
|
* `<vaadin-grid>` is a free, high quality data grid / data table Web Component. The content of the
|
|
@@ -93,6 +94,7 @@ import { gridStyles } from './vaadin-grid-styles.js';
|
|
|
93
94
|
* `expanded` | Boolean | True if the item's tree sublevel is expanded.
|
|
94
95
|
* `selected` | Boolean | True if the item is selected.
|
|
95
96
|
* `detailsOpened` | Boolean | True if the item's row details are open.
|
|
97
|
+
* `hasChildren` | Boolean | True if the item has children
|
|
96
98
|
*
|
|
97
99
|
* The following helper elements can be used for further customization:
|
|
98
100
|
* - [`<vaadin-grid-column-group>`](#/elements/vaadin-grid-column-group)
|
|
@@ -102,7 +104,7 @@ import { gridStyles } from './vaadin-grid-styles.js';
|
|
|
102
104
|
* - [`<vaadin-grid-tree-toggle>`](#/elements/vaadin-grid-tree-toggle)
|
|
103
105
|
*
|
|
104
106
|
* __Note that the helper elements must be explicitly imported.__
|
|
105
|
-
* If you want to import everything at once you can use the `all-imports.
|
|
107
|
+
* If you want to import everything at once you can use the `all-imports.js` entrypoint.
|
|
106
108
|
*
|
|
107
109
|
* ### Lazy Loading with Function Data Provider
|
|
108
110
|
*
|
|
@@ -255,13 +257,14 @@ import { gridStyles } from './vaadin-grid-styles.js';
|
|
|
255
257
|
* @fires {CustomEvent} loading-changed - Fired when the `loading` property changes.
|
|
256
258
|
* @fires {CustomEvent} selected-items-changed - Fired when the `selectedItems` property changes.
|
|
257
259
|
* @fires {CustomEvent} size-changed - Fired when the `size` property changes.
|
|
260
|
+
* @fires {CustomEvent} item-toggle - Fired when the user selects or deselects an item through the selection column.
|
|
258
261
|
*
|
|
259
262
|
* @customElement
|
|
260
263
|
* @extends HTMLElement
|
|
261
264
|
* @mixes GridMixin
|
|
262
265
|
* @mixes ThemableMixin
|
|
263
266
|
*/
|
|
264
|
-
class Grid extends GridMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
|
|
267
|
+
class Grid extends GridMixin(ElementMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {
|
|
265
268
|
static get is() {
|
|
266
269
|
return 'vaadin-grid';
|
|
267
270
|
}
|
package/vaadin-grid-column.js
CHANGED
package/vaadin-grid-filter.js
CHANGED
package/vaadin-grid-sorter.js
CHANGED
package/vaadin-grid.js
CHANGED
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/grid",
|
|
4
|
-
"version": "25.0.0-
|
|
4
|
+
"version": "25.0.0-alpha21",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -238,7 +238,7 @@
|
|
|
238
238
|
},
|
|
239
239
|
{
|
|
240
240
|
"name": "vaadin-grid-column",
|
|
241
|
-
"description": "A `<vaadin-grid-column>` is used to configure how a column in `<vaadin-grid>`\nshould look like.\n\nSee [`<vaadin-grid>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-
|
|
241
|
+
"description": "A `<vaadin-grid-column>` is used to configure how a column in `<vaadin-grid>`\nshould look like.\n\nSee [`<vaadin-grid>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha21/#/elements/vaadin-grid) documentation for instructions on how\nto configure the `<vaadin-grid-column>`.",
|
|
242
242
|
"attributes": [
|
|
243
243
|
{
|
|
244
244
|
"name": "resizable",
|
|
@@ -524,7 +524,7 @@
|
|
|
524
524
|
},
|
|
525
525
|
{
|
|
526
526
|
"name": "renderer",
|
|
527
|
-
"description": "Custom function for rendering the cell content.\nReceives three arguments:\n\n- `root` The cell content DOM element. Append your content to it.\n- `column` The `<vaadin-grid-column>` element.\n- `model` The object with the properties related with\n the rendered item, contains:\n - `model.index` The index of the item.\n - `model.item` The item.\n - `model.expanded` Sublevel toggle state.\n - `model.level` Level of the tree represented with a horizontal offset of the toggle button.\n - `model.selected` Selected state.\n - `model.detailsOpened` Details opened state.",
|
|
527
|
+
"description": "Custom function for rendering the cell content.\nReceives three arguments:\n\n- `root` The cell content DOM element. Append your content to it.\n- `column` The `<vaadin-grid-column>` element.\n- `model` The object with the properties related with\n the rendered item, contains:\n - `model.index` The index of the item.\n - `model.item` The item.\n - `model.expanded` Sublevel toggle state.\n - `model.level` Level of the tree represented with a horizontal offset of the toggle button.\n - `model.selected` Selected state.\n - `model.detailsOpened` Details opened state.\n - `model.hasChildren` Whether the item has children.",
|
|
528
528
|
"value": {
|
|
529
529
|
"type": [
|
|
530
530
|
"GridBodyRenderer",
|
|
@@ -916,7 +916,7 @@
|
|
|
916
916
|
},
|
|
917
917
|
{
|
|
918
918
|
"name": "renderer",
|
|
919
|
-
"description": "Custom function for rendering the cell content.\nReceives three arguments:\n\n- `root` The cell content DOM element. Append your content to it.\n- `column` The `<vaadin-grid-column>` element.\n- `model` The object with the properties related with\n the rendered item, contains:\n - `model.index` The index of the item.\n - `model.item` The item.\n - `model.expanded` Sublevel toggle state.\n - `model.level` Level of the tree represented with a horizontal offset of the toggle button.\n - `model.selected` Selected state.\n - `model.detailsOpened` Details opened state.",
|
|
919
|
+
"description": "Custom function for rendering the cell content.\nReceives three arguments:\n\n- `root` The cell content DOM element. Append your content to it.\n- `column` The `<vaadin-grid-column>` element.\n- `model` The object with the properties related with\n the rendered item, contains:\n - `model.index` The index of the item.\n - `model.item` The item.\n - `model.expanded` Sublevel toggle state.\n - `model.level` Level of the tree represented with a horizontal offset of the toggle button.\n - `model.selected` Selected state.\n - `model.detailsOpened` Details opened state.\n - `model.hasChildren` Whether the item has children.",
|
|
920
920
|
"value": {
|
|
921
921
|
"type": [
|
|
922
922
|
"GridBodyRenderer",
|
|
@@ -951,7 +951,7 @@
|
|
|
951
951
|
},
|
|
952
952
|
{
|
|
953
953
|
"name": "vaadin-grid-selection-column",
|
|
954
|
-
"description": "`<vaadin-grid-selection-column>` is a helper element for the `<vaadin-grid>`\nthat provides default renderers and functionality for item selection.\n\n#### Example:\n```html\n<vaadin-grid>\n <vaadin-grid-selection-column frozen auto-select></vaadin-grid-selection-column>\n\n <vaadin-grid-column>\n ...\n```\n\nBy default the selection column displays `<vaadin-checkbox>` elements in the\ncolumn cells. The checkboxes in the body rows toggle selection of the corresponding row items.\n\nWhen the grid data is provided as an array of [`items`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-
|
|
954
|
+
"description": "`<vaadin-grid-selection-column>` is a helper element for the `<vaadin-grid>`\nthat provides default renderers and functionality for item selection.\n\n#### Example:\n```html\n<vaadin-grid>\n <vaadin-grid-selection-column frozen auto-select></vaadin-grid-selection-column>\n\n <vaadin-grid-column>\n ...\n```\n\nBy default the selection column displays `<vaadin-checkbox>` elements in the\ncolumn cells. The checkboxes in the body rows toggle selection of the corresponding row items.\n\nWhen the grid data is provided as an array of [`items`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha21/#/elements/vaadin-grid#property-items),\nthe column header gets an additional checkbox that can be used for toggling\nselection for all the items at once.\n\n__The default content can also be overridden__",
|
|
955
955
|
"attributes": [
|
|
956
956
|
{
|
|
957
957
|
"name": "resizable",
|
|
@@ -1099,7 +1099,7 @@
|
|
|
1099
1099
|
},
|
|
1100
1100
|
{
|
|
1101
1101
|
"name": "auto-select",
|
|
1102
|
-
"description": "When true, the active gets automatically selected.",
|
|
1102
|
+
"description": "When true, the active item gets automatically selected.",
|
|
1103
1103
|
"value": {
|
|
1104
1104
|
"type": [
|
|
1105
1105
|
"boolean"
|
|
@@ -1266,7 +1266,7 @@
|
|
|
1266
1266
|
},
|
|
1267
1267
|
{
|
|
1268
1268
|
"name": "renderer",
|
|
1269
|
-
"description": "Custom function for rendering the cell content.\nReceives three arguments:\n\n- `root` The cell content DOM element. Append your content to it.\n- `column` The `<vaadin-grid-column>` element.\n- `model` The object with the properties related with\n the rendered item, contains:\n - `model.index` The index of the item.\n - `model.item` The item.\n - `model.expanded` Sublevel toggle state.\n - `model.level` Level of the tree represented with a horizontal offset of the toggle button.\n - `model.selected` Selected state.\n - `model.detailsOpened` Details opened state.",
|
|
1269
|
+
"description": "Custom function for rendering the cell content.\nReceives three arguments:\n\n- `root` The cell content DOM element. Append your content to it.\n- `column` The `<vaadin-grid-column>` element.\n- `model` The object with the properties related with\n the rendered item, contains:\n - `model.index` The index of the item.\n - `model.item` The item.\n - `model.expanded` Sublevel toggle state.\n - `model.level` Level of the tree represented with a horizontal offset of the toggle button.\n - `model.selected` Selected state.\n - `model.detailsOpened` Details opened state.\n - `model.hasChildren` Whether the item has children.",
|
|
1270
1270
|
"value": {
|
|
1271
1271
|
"type": [
|
|
1272
1272
|
"GridBodyRenderer",
|
|
@@ -1308,7 +1308,7 @@
|
|
|
1308
1308
|
},
|
|
1309
1309
|
{
|
|
1310
1310
|
"name": "autoSelect",
|
|
1311
|
-
"description": "When true, the active gets automatically selected.",
|
|
1311
|
+
"description": "When true, the active item gets automatically selected.",
|
|
1312
1312
|
"value": {
|
|
1313
1313
|
"type": [
|
|
1314
1314
|
"boolean"
|
|
@@ -1335,7 +1335,7 @@
|
|
|
1335
1335
|
},
|
|
1336
1336
|
{
|
|
1337
1337
|
"name": "vaadin-grid-sorter",
|
|
1338
|
-
"description": "`<vaadin-grid-sorter>` is a helper element for the `<vaadin-grid>` that provides out-of-the-box UI controls,\nvisual feedback, and handlers for sorting the grid data.\n\n#### Example:\n```html\n<vaadin-grid-column id=\"column\"></vaadin-grid-column>\n```\n```js\nconst column = document.querySelector('#column');\ncolumn.renderer = (root, column, model) => {\n let sorter = root.firstElementChild;\n if (!sorter) {\n sorter = document.createElement('vaadin-grid-sorter');\n root.appendChild(sorter);\n }\n sorter.path = 'name.first';\n};\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n----------------|----------------\n`content` | The slotted content wrapper\n`indicators` | The internal sorter indicators.\n`order` | The internal sorter order\n\nThe following state attributes are available for styling:\n\nAttribute | Description
|
|
1338
|
+
"description": "`<vaadin-grid-sorter>` is a helper element for the `<vaadin-grid>` that provides out-of-the-box UI controls,\nvisual feedback, and handlers for sorting the grid data.\n\n#### Example:\n```html\n<vaadin-grid-column id=\"column\"></vaadin-grid-column>\n```\n```js\nconst column = document.querySelector('#column');\ncolumn.renderer = (root, column, model) => {\n let sorter = root.firstElementChild;\n if (!sorter) {\n sorter = document.createElement('vaadin-grid-sorter');\n root.appendChild(sorter);\n }\n sorter.path = 'name.first';\n};\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n----------------|----------------\n`content` | The slotted content wrapper\n`indicators` | The internal sorter indicators.\n`order` | The internal sorter order\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n-------------|---------------------------\n`direction` | Sort direction of a sorter",
|
|
1339
1339
|
"attributes": [
|
|
1340
1340
|
{
|
|
1341
1341
|
"name": "path",
|
|
@@ -1700,7 +1700,7 @@
|
|
|
1700
1700
|
},
|
|
1701
1701
|
{
|
|
1702
1702
|
"name": "renderer",
|
|
1703
|
-
"description": "Custom function for rendering the cell content.\nReceives three arguments:\n\n- `root` The cell content DOM element. Append your content to it.\n- `column` The `<vaadin-grid-column>` element.\n- `model` The object with the properties related with\n the rendered item, contains:\n - `model.index` The index of the item.\n - `model.item` The item.\n - `model.expanded` Sublevel toggle state.\n - `model.level` Level of the tree represented with a horizontal offset of the toggle button.\n - `model.selected` Selected state.\n - `model.detailsOpened` Details opened state.",
|
|
1703
|
+
"description": "Custom function for rendering the cell content.\nReceives three arguments:\n\n- `root` The cell content DOM element. Append your content to it.\n- `column` The `<vaadin-grid-column>` element.\n- `model` The object with the properties related with\n the rendered item, contains:\n - `model.index` The index of the item.\n - `model.item` The item.\n - `model.expanded` Sublevel toggle state.\n - `model.level` Level of the tree represented with a horizontal offset of the toggle button.\n - `model.selected` Selected state.\n - `model.detailsOpened` Details opened state.\n - `model.hasChildren` Whether the item has children.",
|
|
1704
1704
|
"value": {
|
|
1705
1705
|
"type": [
|
|
1706
1706
|
"GridBodyRenderer",
|
|
@@ -1750,7 +1750,7 @@
|
|
|
1750
1750
|
},
|
|
1751
1751
|
{
|
|
1752
1752
|
"name": "vaadin-grid-tree-toggle",
|
|
1753
|
-
"description": "`<vaadin-grid-tree-toggle>` is a helper element for the `<vaadin-grid>`\nthat provides toggle and level display functionality for the item tree.\n\n#### Example:\n```html\n<vaadin-grid-column id=\"column\"></vaadin-grid-column>\n```\n```js\nconst column = document.querySelector('#column');\ncolumn.renderer = (root, column, model) => {\n let treeToggle = root.firstElementChild;\n if (!treeToggle) {\n treeToggle = document.createElement('vaadin-grid-tree-toggle');\n treeToggle.addEventListener('expanded-changed', () => { ... });\n root.appendChild(treeToggle);\n }\n treeToggle.leaf = !model.item.hasChildren;\n treeToggle.level = level;\n treeToggle.expanded = expanded;\n treeToggle.textContent = model.item.name;\n};\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---|---\n`toggle` | The tree toggle icon\n\nThe following state attributes are available for styling:\n\nAttribute
|
|
1753
|
+
"description": "`<vaadin-grid-tree-toggle>` is a helper element for the `<vaadin-grid>`\nthat provides toggle and level display functionality for the item tree.\n\n#### Example:\n```html\n<vaadin-grid-column id=\"column\"></vaadin-grid-column>\n```\n```js\nconst column = document.querySelector('#column');\ncolumn.renderer = (root, column, model) => {\n let treeToggle = root.firstElementChild;\n if (!treeToggle) {\n treeToggle = document.createElement('vaadin-grid-tree-toggle');\n treeToggle.addEventListener('expanded-changed', () => { ... });\n root.appendChild(treeToggle);\n }\n treeToggle.leaf = !model.item.hasChildren;\n treeToggle.level = level;\n treeToggle.expanded = expanded;\n treeToggle.textContent = model.item.name;\n};\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---|---\n`toggle` | The tree toggle icon\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n-----------|-------------------------------------\n`expanded` | When present, the toggle is expanded\n`leaf` | When present, the toggle is not expandable, i. e., the current item is a leaf\n\nThe following custom CSS properties are available on\nthe `<vaadin-grid-tree-toggle>` element:\n\nCustom CSS property | Description | Default\n---|---|---\n`--vaadin-grid-tree-toggle-level-offset` | Visual offset step for each tree sublevel | `1em`",
|
|
1754
1754
|
"attributes": [
|
|
1755
1755
|
{
|
|
1756
1756
|
"name": "level",
|
|
@@ -2117,7 +2117,7 @@
|
|
|
2117
2117
|
},
|
|
2118
2118
|
{
|
|
2119
2119
|
"name": "renderer",
|
|
2120
|
-
"description": "Custom function for rendering the cell content.\nReceives three arguments:\n\n- `root` The cell content DOM element. Append your content to it.\n- `column` The `<vaadin-grid-column>` element.\n- `model` The object with the properties related with\n the rendered item, contains:\n - `model.index` The index of the item.\n - `model.item` The item.\n - `model.expanded` Sublevel toggle state.\n - `model.level` Level of the tree represented with a horizontal offset of the toggle button.\n - `model.selected` Selected state.\n - `model.detailsOpened` Details opened state.",
|
|
2120
|
+
"description": "Custom function for rendering the cell content.\nReceives three arguments:\n\n- `root` The cell content DOM element. Append your content to it.\n- `column` The `<vaadin-grid-column>` element.\n- `model` The object with the properties related with\n the rendered item, contains:\n - `model.index` The index of the item.\n - `model.item` The item.\n - `model.expanded` Sublevel toggle state.\n - `model.level` Level of the tree represented with a horizontal offset of the toggle button.\n - `model.selected` Selected state.\n - `model.detailsOpened` Details opened state.\n - `model.hasChildren` Whether the item has children.",
|
|
2121
2121
|
"value": {
|
|
2122
2122
|
"type": [
|
|
2123
2123
|
"GridBodyRenderer",
|
|
@@ -2152,7 +2152,7 @@
|
|
|
2152
2152
|
},
|
|
2153
2153
|
{
|
|
2154
2154
|
"name": "vaadin-grid",
|
|
2155
|
-
"description": "`<vaadin-grid>` is a free, high quality data grid / data table Web Component. The content of the\nthe grid can be populated by using renderer callback function.\n\n### Quick Start\n\nStart with an assigning an array to the [`items`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha2/#/elements/vaadin-grid#property-items) property to visualize your data.\n\nUse the [`<vaadin-grid-column>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha2/#/elements/vaadin-grid-column) element to configure the grid columns. Set `path` and `header`\nshorthand properties for the columns to define what gets rendered in the cells of the column.\n\n#### Example:\n```html\n<vaadin-grid>\n <vaadin-grid-column path=\"name.first\" header=\"First name\"></vaadin-grid-column>\n <vaadin-grid-column path=\"name.last\" header=\"Last name\"></vaadin-grid-column>\n <vaadin-grid-column path=\"email\"></vaadin-grid-column>\n</vaadin-grid>\n```\n\nFor custom content `vaadin-grid-column` element provides you with three types of `renderer` callback functions: `headerRenderer`,\n`renderer` and `footerRenderer`.\n\nEach of those renderer functions provides `root`, `column`, `model` arguments when applicable.\nGenerate DOM content, append it to the `root` element and control the state\nof the host element by accessing `column`. Before generating new content,\nusers are able to check if there is already content in `root` for reusing it.\n\nRenderers are called on initialization of new column cells and each time the\nrelated row model is updated. DOM generated during the renderer call can be reused\nin the next renderer call and will be provided with the `root` argument.\nOn first call it will be empty.\n\n#### Example:\n```html\n<vaadin-grid>\n <vaadin-grid-column></vaadin-grid-column>\n <vaadin-grid-column></vaadin-grid-column>\n <vaadin-grid-column></vaadin-grid-column>\n</vaadin-grid>\n```\n```js\nconst grid = document.querySelector('vaadin-grid');\ngrid.items = [{'name': 'John', 'surname': 'Lennon', 'role': 'singer'},\n {'name': 'Ringo', 'surname': 'Starr', 'role': 'drums'}];\n\nconst columns = grid.querySelectorAll('vaadin-grid-column');\n\ncolumns[0].headerRenderer = function(root) {\n root.textContent = 'Name';\n};\ncolumns[0].renderer = function(root, column, model) {\n root.textContent = model.item.name;\n};\n\ncolumns[1].headerRenderer = function(root) {\n root.textContent = 'Surname';\n};\ncolumns[1].renderer = function(root, column, model) {\n root.textContent = model.item.surname;\n};\n\ncolumns[2].headerRenderer = function(root) {\n root.textContent = 'Role';\n};\ncolumns[2].renderer = function(root, column, model) {\n root.textContent = model.item.role;\n};\n```\n\nThe following properties are available in the `model` argument:\n\nProperty name | Type | Description\n--------------|------|------------\n`index`| Number | The index of the item.\n`item` | String or Object | The item.\n`level` | Number | Number of the item's tree sublevel, starts from 0.\n`expanded` | Boolean | True if the item's tree sublevel is expanded.\n`selected` | Boolean | True if the item is selected.\n`detailsOpened` | Boolean | True if the item's row details are open.\n\nThe following helper elements can be used for further customization:\n- [`<vaadin-grid-column-group>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha2/#/elements/vaadin-grid-column-group)\n- [`<vaadin-grid-filter>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha2/#/elements/vaadin-grid-filter)\n- [`<vaadin-grid-sorter>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha2/#/elements/vaadin-grid-sorter)\n- [`<vaadin-grid-selection-column>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha2/#/elements/vaadin-grid-selection-column)\n- [`<vaadin-grid-tree-toggle>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha2/#/elements/vaadin-grid-tree-toggle)\n\n__Note that the helper elements must be explicitly imported.__\nIf you want to import everything at once you can use the `all-imports.html` bundle.\n\n### Lazy Loading with Function Data Provider\n\nIn addition to assigning an array to the items property, you can alternatively\nprovide the `<vaadin-grid>` data through the\n[`dataProvider`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha2/#/elements/vaadin-grid#property-dataProvider) function property.\nThe `<vaadin-grid>` calls this function lazily, only when it needs more data\nto be displayed.\n\nSee the [`dataProvider`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha2/#/elements/vaadin-grid#property-dataProvider) property\ndocumentation for the detailed data provider arguments description.\n\n__Note that expanding the tree grid's item will trigger a call to the `dataProvider`.__\n\n__Also, note that when using function data providers, the total number of items\nneeds to be set manually. The total number of items can be returned\nin the second argument of the data provider callback:__\n\n```javascript\ngrid.dataProvider = ({page, pageSize}, callback) => {\n // page: the requested page index\n // pageSize: number of items on one page\n const url = `https://api.example/data?page=${page}&per_page=${pageSize}`;\n\n fetch(url)\n .then((res) => res.json())\n .then(({ employees, totalSize }) => {\n callback(employees, totalSize);\n });\n};\n```\n\n__Alternatively, you can use the `size` property to set the total number of items:__\n\n```javascript\ngrid.size = 200; // The total number of items\ngrid.dataProvider = ({page, pageSize}, callback) => {\n const url = `https://api.example/data?page=${page}&per_page=${pageSize}`;\n\n fetch(url)\n .then((res) => res.json())\n .then((resJson) => callback(resJson.employees));\n};\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------------|----------------\n`row` | Row in the internal table\n`body-row` | Body row in the internal table\n`collapsed-row` | Collapsed row\n`expanded-row` | Expanded row\n`selected-row` | Selected row\n`nonselectable-row` | Row that the user may not select or deselect\n`details-opened-row` | Row with details open\n`odd-row` | Odd row\n`even-row` | Even row\n`first-row` | The first body row\n`last-row` | The last body row\n`dragstart-row` | Set on the row for one frame when drag is starting.\n`dragover-above-row` | Set on the row when the a row is dragged over above\n`dragover-below-row` | Set on the row when the a row is dragged over below\n`dragover-on-top-row` | Set on the row when the a row is dragged over on top\n`drag-disabled-row` | Set to a row that isn't available for dragging\n`drop-disabled-row` | Set to a row that can't be dropped on top of\n`cell` | Cell in the internal table\n`header-cell` | Header cell in the internal table\n`body-cell` | Body cell in the internal table\n`footer-cell` | Footer cell in the internal table\n`details-cell` | Row details cell in the internal table\n`focused-cell` | Focused cell in the internal table\n`odd-row-cell` | Cell in an odd row\n`even-row-cell` | Cell in an even row\n`first-row-cell` | Cell in the first body row\n`last-row-cell` | Cell in the last body row\n`first-header-row-cell` | Cell in the first header row\n`first-footer-row-cell` | Cell in the first footer row\n`last-header-row-cell` | Cell in the last header row\n`last-footer-row-cell` | Cell in the last footer row\n`loading-row-cell` | Cell in a row that is waiting for data from data provider\n`selected-row-cell` | Cell in a selected row\n`nonselectable-row-cell` | Cell in a row that the user may not select or deselect\n`collapsed-row-cell` | Cell in a collapsed row\n`expanded-row-cell` | Cell in an expanded row\n`details-opened-row-cell` | Cell in an row with details open\n`dragstart-row-cell` | Cell in the ghost image row, but not in a source row\n`drag-source-row-cell` | Cell in a source row, but not in the ghost image\n`dragover-above-row-cell` | Cell in a row that has another row dragged over above\n`dragover-below-row-cell` | Cell in a row that has another row dragged over below\n`dragover-on-top-row-cell` | Cell in a row that has another row dragged over on top\n`drag-disabled-row-cell` | Cell in a row that isn't available for dragging\n`drop-disabled-row-cell` | Cell in a row that can't be dropped on top of\n`frozen-cell` | Frozen cell in the internal table\n`frozen-to-end-cell` | Frozen to end cell in the internal table\n`last-frozen-cell` | Last frozen cell\n`first-frozen-to-end-cell` | First cell frozen to end\n`first-column-cell` | First visible cell on a row\n`last-column-cell` | Last visible cell on a row\n`reorder-allowed-cell` | Cell in a column where another column can be reordered\n`reorder-dragging-cell` | Cell in a column currently being reordered\n`resize-handle` | Handle for resizing the columns\n`empty-state` | The container for the content to be displayed when there are no body rows to show\n`reorder-ghost` | Ghost element of the header cell being dragged\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n----------------------|---------------------------------------------------------------------------------------------------|-----------\n`loading` | Set when the grid is loading data from data provider | :host\n`interacting` | Keyboard navigation in interaction mode | :host\n`navigating` | Keyboard navigation in navigation mode | :host\n`overflow` | Set when rows are overflowing the grid viewport. Possible values: `top`, `bottom`, `start`, `end` | :host\n`reordering` | Set when the grid's columns are being reordered | :host\n`dragover` | Set when the grid (not a specific row) is dragged over | :host\n`dragging-rows` | Set when grid rows are dragged | :host\n`reorder-status` | Reflects the status of a cell while columns are being reordered | cell\n`frozen` | Frozen cell | cell\n`frozen-to-end` | Cell frozen to end | cell\n`last-frozen` | Last frozen cell | cell\n`first-frozen-to-end` | First cell frozen to end | cell\n`first-column` | First visible cell on a row | cell\n`last-column` | Last visible cell on a row | cell\n`selected` | Selected row | row\n`expanded` | Expanded row | row\n`details-opened` | Row with details open | row\n`loading` | Row that is waiting for data from data provider | row\n`odd` | Odd row | row\n`first` | The first body row | row\n`last` | The last body row | row\n`dragstart` | Set for one frame when starting to drag a row. The value is a number when dragging multiple rows | row\n`dragover` | Set when the row is dragged over | row\n`drag-disabled` | Set to a row that isn't available for dragging | row\n`drop-disabled` | Set to a row that can't be dropped on top of | row\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
2155
|
+
"description": "`<vaadin-grid>` is a free, high quality data grid / data table Web Component. The content of the\nthe grid can be populated by using renderer callback function.\n\n### Quick Start\n\nStart with an assigning an array to the [`items`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha21/#/elements/vaadin-grid#property-items) property to visualize your data.\n\nUse the [`<vaadin-grid-column>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha21/#/elements/vaadin-grid-column) element to configure the grid columns. Set `path` and `header`\nshorthand properties for the columns to define what gets rendered in the cells of the column.\n\n#### Example:\n```html\n<vaadin-grid>\n <vaadin-grid-column path=\"name.first\" header=\"First name\"></vaadin-grid-column>\n <vaadin-grid-column path=\"name.last\" header=\"Last name\"></vaadin-grid-column>\n <vaadin-grid-column path=\"email\"></vaadin-grid-column>\n</vaadin-grid>\n```\n\nFor custom content `vaadin-grid-column` element provides you with three types of `renderer` callback functions: `headerRenderer`,\n`renderer` and `footerRenderer`.\n\nEach of those renderer functions provides `root`, `column`, `model` arguments when applicable.\nGenerate DOM content, append it to the `root` element and control the state\nof the host element by accessing `column`. Before generating new content,\nusers are able to check if there is already content in `root` for reusing it.\n\nRenderers are called on initialization of new column cells and each time the\nrelated row model is updated. DOM generated during the renderer call can be reused\nin the next renderer call and will be provided with the `root` argument.\nOn first call it will be empty.\n\n#### Example:\n```html\n<vaadin-grid>\n <vaadin-grid-column></vaadin-grid-column>\n <vaadin-grid-column></vaadin-grid-column>\n <vaadin-grid-column></vaadin-grid-column>\n</vaadin-grid>\n```\n```js\nconst grid = document.querySelector('vaadin-grid');\ngrid.items = [{'name': 'John', 'surname': 'Lennon', 'role': 'singer'},\n {'name': 'Ringo', 'surname': 'Starr', 'role': 'drums'}];\n\nconst columns = grid.querySelectorAll('vaadin-grid-column');\n\ncolumns[0].headerRenderer = function(root) {\n root.textContent = 'Name';\n};\ncolumns[0].renderer = function(root, column, model) {\n root.textContent = model.item.name;\n};\n\ncolumns[1].headerRenderer = function(root) {\n root.textContent = 'Surname';\n};\ncolumns[1].renderer = function(root, column, model) {\n root.textContent = model.item.surname;\n};\n\ncolumns[2].headerRenderer = function(root) {\n root.textContent = 'Role';\n};\ncolumns[2].renderer = function(root, column, model) {\n root.textContent = model.item.role;\n};\n```\n\nThe following properties are available in the `model` argument:\n\nProperty name | Type | Description\n--------------|------|------------\n`index`| Number | The index of the item.\n`item` | String or Object | The item.\n`level` | Number | Number of the item's tree sublevel, starts from 0.\n`expanded` | Boolean | True if the item's tree sublevel is expanded.\n`selected` | Boolean | True if the item is selected.\n`detailsOpened` | Boolean | True if the item's row details are open.\n`hasChildren` | Boolean | True if the item has children\n\nThe following helper elements can be used for further customization:\n- [`<vaadin-grid-column-group>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha21/#/elements/vaadin-grid-column-group)\n- [`<vaadin-grid-filter>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha21/#/elements/vaadin-grid-filter)\n- [`<vaadin-grid-sorter>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha21/#/elements/vaadin-grid-sorter)\n- [`<vaadin-grid-selection-column>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha21/#/elements/vaadin-grid-selection-column)\n- [`<vaadin-grid-tree-toggle>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha21/#/elements/vaadin-grid-tree-toggle)\n\n__Note that the helper elements must be explicitly imported.__\nIf you want to import everything at once you can use the `all-imports.js` entrypoint.\n\n### Lazy Loading with Function Data Provider\n\nIn addition to assigning an array to the items property, you can alternatively\nprovide the `<vaadin-grid>` data through the\n[`dataProvider`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha21/#/elements/vaadin-grid#property-dataProvider) function property.\nThe `<vaadin-grid>` calls this function lazily, only when it needs more data\nto be displayed.\n\nSee the [`dataProvider`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha21/#/elements/vaadin-grid#property-dataProvider) property\ndocumentation for the detailed data provider arguments description.\n\n__Note that expanding the tree grid's item will trigger a call to the `dataProvider`.__\n\n__Also, note that when using function data providers, the total number of items\nneeds to be set manually. The total number of items can be returned\nin the second argument of the data provider callback:__\n\n```javascript\ngrid.dataProvider = ({page, pageSize}, callback) => {\n // page: the requested page index\n // pageSize: number of items on one page\n const url = `https://api.example/data?page=${page}&per_page=${pageSize}`;\n\n fetch(url)\n .then((res) => res.json())\n .then(({ employees, totalSize }) => {\n callback(employees, totalSize);\n });\n};\n```\n\n__Alternatively, you can use the `size` property to set the total number of items:__\n\n```javascript\ngrid.size = 200; // The total number of items\ngrid.dataProvider = ({page, pageSize}, callback) => {\n const url = `https://api.example/data?page=${page}&per_page=${pageSize}`;\n\n fetch(url)\n .then((res) => res.json())\n .then((resJson) => callback(resJson.employees));\n};\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------------|----------------\n`row` | Row in the internal table\n`body-row` | Body row in the internal table\n`collapsed-row` | Collapsed row\n`expanded-row` | Expanded row\n`selected-row` | Selected row\n`nonselectable-row` | Row that the user may not select or deselect\n`details-opened-row` | Row with details open\n`odd-row` | Odd row\n`even-row` | Even row\n`first-row` | The first body row\n`last-row` | The last body row\n`dragstart-row` | Set on the row for one frame when drag is starting.\n`dragover-above-row` | Set on the row when the a row is dragged over above\n`dragover-below-row` | Set on the row when the a row is dragged over below\n`dragover-on-top-row` | Set on the row when the a row is dragged over on top\n`drag-disabled-row` | Set to a row that isn't available for dragging\n`drop-disabled-row` | Set to a row that can't be dropped on top of\n`cell` | Cell in the internal table\n`header-cell` | Header cell in the internal table\n`body-cell` | Body cell in the internal table\n`footer-cell` | Footer cell in the internal table\n`details-cell` | Row details cell in the internal table\n`focused-cell` | Focused cell in the internal table\n`odd-row-cell` | Cell in an odd row\n`even-row-cell` | Cell in an even row\n`first-row-cell` | Cell in the first body row\n`last-row-cell` | Cell in the last body row\n`first-header-row-cell` | Cell in the first header row\n`first-footer-row-cell` | Cell in the first footer row\n`last-header-row-cell` | Cell in the last header row\n`last-footer-row-cell` | Cell in the last footer row\n`loading-row-cell` | Cell in a row that is waiting for data from data provider\n`selected-row-cell` | Cell in a selected row\n`nonselectable-row-cell` | Cell in a row that the user may not select or deselect\n`collapsed-row-cell` | Cell in a collapsed row\n`expanded-row-cell` | Cell in an expanded row\n`details-opened-row-cell` | Cell in an row with details open\n`dragstart-row-cell` | Cell in the ghost image row, but not in a source row\n`drag-source-row-cell` | Cell in a source row, but not in the ghost image\n`dragover-above-row-cell` | Cell in a row that has another row dragged over above\n`dragover-below-row-cell` | Cell in a row that has another row dragged over below\n`dragover-on-top-row-cell` | Cell in a row that has another row dragged over on top\n`drag-disabled-row-cell` | Cell in a row that isn't available for dragging\n`drop-disabled-row-cell` | Cell in a row that can't be dropped on top of\n`frozen-cell` | Frozen cell in the internal table\n`frozen-to-end-cell` | Frozen to end cell in the internal table\n`last-frozen-cell` | Last frozen cell\n`first-frozen-to-end-cell` | First cell frozen to end\n`first-column-cell` | First visible cell on a row\n`last-column-cell` | Last visible cell on a row\n`reorder-allowed-cell` | Cell in a column where another column can be reordered\n`reorder-dragging-cell` | Cell in a column currently being reordered\n`resize-handle` | Handle for resizing the columns\n`empty-state` | The container for the content to be displayed when there are no body rows to show\n`reorder-ghost` | Ghost element of the header cell being dragged\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n----------------------|---------------------------------------------------------------------------------------------------|-----------\n`loading` | Set when the grid is loading data from data provider | :host\n`interacting` | Keyboard navigation in interaction mode | :host\n`navigating` | Keyboard navigation in navigation mode | :host\n`overflow` | Set when rows are overflowing the grid viewport. Possible values: `top`, `bottom`, `start`, `end` | :host\n`reordering` | Set when the grid's columns are being reordered | :host\n`dragover` | Set when the grid (not a specific row) is dragged over | :host\n`dragging-rows` | Set when grid rows are dragged | :host\n`reorder-status` | Reflects the status of a cell while columns are being reordered | cell\n`frozen` | Frozen cell | cell\n`frozen-to-end` | Cell frozen to end | cell\n`last-frozen` | Last frozen cell | cell\n`first-frozen-to-end` | First cell frozen to end | cell\n`first-column` | First visible cell on a row | cell\n`last-column` | Last visible cell on a row | cell\n`selected` | Selected row | row\n`expanded` | Expanded row | row\n`details-opened` | Row with details open | row\n`loading` | Row that is waiting for data from data provider | row\n`odd` | Odd row | row\n`first` | The first body row | row\n`last` | The last body row | row\n`dragstart` | Set for one frame when starting to drag a row. The value is a number when dragging multiple rows | row\n`dragover` | Set when the row is dragged over | row\n`drag-disabled` | Set to a row that isn't available for dragging | row\n`drop-disabled` | Set to a row that can't be dropped on top of | row\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
2156
2156
|
"attributes": [
|
|
2157
2157
|
{
|
|
2158
2158
|
"name": "accessible-name",
|