@vaadin/grid 24.2.3 → 24.3.0-alpha10
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/package.json +18 -13
- package/src/vaadin-grid-a11y-mixin.js +1 -1
- package/src/vaadin-grid-active-item-mixin.js +1 -0
- package/src/vaadin-grid-array-data-provider-mixin.js +14 -17
- package/src/vaadin-grid-column-group-mixin.d.ts +20 -0
- package/src/vaadin-grid-column-group-mixin.js +364 -0
- package/src/vaadin-grid-column-group.d.ts +4 -14
- package/src/vaadin-grid-column-group.js +5 -355
- package/src/vaadin-grid-column-mixin.d.ts +170 -0
- package/src/vaadin-grid-column-mixin.js +958 -0
- package/src/vaadin-grid-column.d.ts +11 -138
- package/src/vaadin-grid-column.js +5 -876
- package/src/vaadin-grid-data-provider-mixin.d.ts +6 -30
- package/src/vaadin-grid-data-provider-mixin.js +122 -246
- package/src/vaadin-grid-drag-and-drop-mixin.js +17 -5
- package/src/vaadin-grid-dynamic-columns-mixin.js +22 -17
- package/src/vaadin-grid-filter-column-mixin.d.ts +22 -0
- package/src/vaadin-grid-filter-column-mixin.js +106 -0
- package/src/vaadin-grid-filter-column.d.ts +9 -11
- package/src/vaadin-grid-filter-column.js +3 -90
- package/src/vaadin-grid-filter-element-mixin.d.ts +34 -0
- package/src/vaadin-grid-filter-element-mixin.js +108 -0
- package/src/vaadin-grid-filter-mixin.js +4 -4
- package/src/vaadin-grid-filter.d.ts +4 -21
- package/src/vaadin-grid-filter.js +5 -84
- package/src/vaadin-grid-helpers.js +94 -0
- package/src/vaadin-grid-keyboard-navigation-mixin.js +11 -4
- package/src/vaadin-grid-mixin.js +21 -37
- package/src/vaadin-grid-row-details-mixin.js +7 -8
- package/src/vaadin-grid-scroll-mixin.js +2 -1
- package/src/vaadin-grid-selection-column-base-mixin.js +12 -4
- package/src/vaadin-grid-selection-column-mixin.d.ts +24 -0
- package/src/vaadin-grid-selection-column-mixin.js +194 -0
- package/src/vaadin-grid-selection-column.d.ts +13 -17
- package/src/vaadin-grid-selection-column.js +4 -186
- package/src/vaadin-grid-selection-mixin.js +4 -3
- package/src/vaadin-grid-sort-column-mixin.d.ts +36 -0
- package/src/vaadin-grid-sort-column-mixin.js +101 -0
- package/src/vaadin-grid-sort-column.d.ts +8 -26
- package/src/vaadin-grid-sort-column.js +3 -87
- package/src/vaadin-grid-sorter-mixin.d.ts +44 -0
- package/src/vaadin-grid-sorter-mixin.js +200 -0
- package/src/vaadin-grid-sorter.d.ts +3 -32
- package/src/vaadin-grid-sorter.js +5 -181
- package/src/vaadin-grid-styles.js +341 -345
- package/src/vaadin-grid-styling-mixin.js +8 -2
- package/src/vaadin-grid-tree-column-mixin.d.ts +18 -0
- package/src/vaadin-grid-tree-column-mixin.js +99 -0
- package/src/vaadin-grid-tree-column.d.ts +9 -7
- package/src/vaadin-grid-tree-column.js +3 -82
- package/src/vaadin-grid-tree-toggle-mixin.d.ts +39 -0
- package/src/vaadin-grid-tree-toggle-mixin.js +153 -0
- package/src/vaadin-grid-tree-toggle.d.ts +4 -27
- package/src/vaadin-grid-tree-toggle.js +9 -141
- package/src/vaadin-grid.d.ts +3 -0
- package/src/vaadin-grid.js +7 -2
- package/theme/lumo/vaadin-grid-sorter-styles.js +1 -1
- package/theme/lumo/vaadin-grid-styles.js +15 -14
- package/theme/material/vaadin-grid-styles.js +15 -10
- package/web-types.json +331 -126
- package/web-types.lit.json +114 -58
package/web-types.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/grid",
|
|
4
|
-
"version": "24.
|
|
4
|
+
"version": "24.3.0-alpha10",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"elements": [
|
|
9
9
|
{
|
|
10
|
-
"name": "vaadin-grid-column",
|
|
11
|
-
"description": "A `<vaadin-grid-column>` is used to
|
|
10
|
+
"name": "vaadin-grid-column-group",
|
|
11
|
+
"description": "A `<vaadin-grid-column-group>` is used to make groups of columns in `<vaadin-grid>` and\nto configure additional headers and footers.\n\nGroups can be nested to create complex header and footer configurations.\n\n#### Example:\n```html\n<vaadin-grid-column-group resizable id=\"columnGroup\">\n <vaadin-grid-column id=\"column1\"></vaadin-grid-column>\n <vaadin-grid-column id=\"column2\"></vaadin-grid-column>\n</vaadin-grid-column-group>\n```\n```js\nconst columnGroup = document.querySelector('#columnGroup');\ncolumnGroup.headerRenderer = (root, columnGroup) => {\n root.textContent = 'header';\n}\n\nconst column1 = document.querySelector('#column1');\ncolumn1.headerRenderer = (root, column) => { ... };\ncolumn1.renderer = (root, column, model) => { ... };\n\nconst column2 = document.querySelector('#column2');\ncolumn2.headerRenderer = (root, column) => { ... };\ncolumn2.renderer = (root, column, model) => { ... };\n```",
|
|
12
12
|
"attributes": [
|
|
13
13
|
{
|
|
14
14
|
"name": "resizable",
|
|
@@ -82,8 +82,8 @@
|
|
|
82
82
|
}
|
|
83
83
|
},
|
|
84
84
|
{
|
|
85
|
-
"name": "
|
|
86
|
-
"description": "
|
|
85
|
+
"name": "header-part-name",
|
|
86
|
+
"description": "Custom part name for the header cell.",
|
|
87
87
|
"value": {
|
|
88
88
|
"type": [
|
|
89
89
|
"string",
|
|
@@ -93,17 +93,8 @@
|
|
|
93
93
|
}
|
|
94
94
|
},
|
|
95
95
|
{
|
|
96
|
-
"name": "
|
|
97
|
-
"description": "
|
|
98
|
-
"value": {
|
|
99
|
-
"type": [
|
|
100
|
-
"number"
|
|
101
|
-
]
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
"name": "path",
|
|
106
|
-
"description": "Path to an item sub-property whose value gets displayed in the column body cells.\nThe property name is also shown in the column header if an explicit header or renderer isn't defined.",
|
|
96
|
+
"name": "footer-part-name",
|
|
97
|
+
"description": "Custom part name for the footer cell.",
|
|
107
98
|
"value": {
|
|
108
99
|
"type": [
|
|
109
100
|
"string",
|
|
@@ -112,15 +103,6 @@
|
|
|
112
103
|
]
|
|
113
104
|
}
|
|
114
105
|
},
|
|
115
|
-
{
|
|
116
|
-
"name": "auto-width",
|
|
117
|
-
"description": "Automatically sets the width of the column based on the column contents when this is set to `true`.\n\nFor performance reasons the column width is calculated automatically only once when the grid items\nare rendered for the first time and the calculation only considers the rows which are currently\nrendered in DOM (a bit more than what is currently visible). If the grid is scrolled, or the cell\ncontent changes, the column width might not match the contents anymore.\n\nHidden columns are ignored in the calculation and their widths are not automatically updated when\nyou show a column that was initially hidden.\n\nYou can manually trigger the auto sizing behavior again by calling `grid.recalculateColumnWidths()`.\n\nThe column width may still grow larger when `flexGrow` is not 0.",
|
|
118
|
-
"value": {
|
|
119
|
-
"type": [
|
|
120
|
-
"boolean"
|
|
121
|
-
]
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
106
|
{
|
|
125
107
|
"name": "theme",
|
|
126
108
|
"description": "The theme variants to apply to the component.",
|
|
@@ -207,30 +189,19 @@
|
|
|
207
189
|
}
|
|
208
190
|
},
|
|
209
191
|
{
|
|
210
|
-
"name": "
|
|
211
|
-
"description": "Custom
|
|
212
|
-
"value": {
|
|
213
|
-
"type": [
|
|
214
|
-
"GridHeaderFooterRenderer",
|
|
215
|
-
"null",
|
|
216
|
-
"undefined"
|
|
217
|
-
]
|
|
218
|
-
}
|
|
219
|
-
},
|
|
220
|
-
{
|
|
221
|
-
"name": "footerRenderer",
|
|
222
|
-
"description": "Custom function for rendering the footer content.\nReceives two arguments:\n\n- `root` The footer cell content DOM element. Append your content to it.\n- `column` The `<vaadin-grid-column>` element.",
|
|
192
|
+
"name": "headerPartName",
|
|
193
|
+
"description": "Custom part name for the header cell.",
|
|
223
194
|
"value": {
|
|
224
195
|
"type": [
|
|
225
|
-
"
|
|
196
|
+
"string",
|
|
226
197
|
"null",
|
|
227
198
|
"undefined"
|
|
228
199
|
]
|
|
229
200
|
}
|
|
230
201
|
},
|
|
231
202
|
{
|
|
232
|
-
"name": "
|
|
233
|
-
"description": "
|
|
203
|
+
"name": "footerPartName",
|
|
204
|
+
"description": "Custom part name for the footer cell.",
|
|
234
205
|
"value": {
|
|
235
206
|
"type": [
|
|
236
207
|
"string",
|
|
@@ -240,52 +211,34 @@
|
|
|
240
211
|
}
|
|
241
212
|
},
|
|
242
213
|
{
|
|
243
|
-
"name": "
|
|
244
|
-
"description": "
|
|
245
|
-
"value": {
|
|
246
|
-
"type": [
|
|
247
|
-
"number"
|
|
248
|
-
]
|
|
249
|
-
}
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
"name": "renderer",
|
|
253
|
-
"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.",
|
|
214
|
+
"name": "headerRenderer",
|
|
215
|
+
"description": "Custom function for rendering the header content.\nReceives two arguments:\n\n- `root` The header cell content DOM element. Append your content to it.\n- `column` The `<vaadin-grid-column>` element.",
|
|
254
216
|
"value": {
|
|
255
217
|
"type": [
|
|
256
|
-
"
|
|
218
|
+
"GridHeaderFooterRenderer",
|
|
257
219
|
"null",
|
|
258
220
|
"undefined"
|
|
259
221
|
]
|
|
260
222
|
}
|
|
261
223
|
},
|
|
262
224
|
{
|
|
263
|
-
"name": "
|
|
264
|
-
"description": "
|
|
225
|
+
"name": "footerRenderer",
|
|
226
|
+
"description": "Custom function for rendering the footer content.\nReceives two arguments:\n\n- `root` The footer cell content DOM element. Append your content to it.\n- `column` The `<vaadin-grid-column>` element.",
|
|
265
227
|
"value": {
|
|
266
228
|
"type": [
|
|
267
|
-
"
|
|
229
|
+
"GridHeaderFooterRenderer",
|
|
268
230
|
"null",
|
|
269
231
|
"undefined"
|
|
270
232
|
]
|
|
271
233
|
}
|
|
272
|
-
},
|
|
273
|
-
{
|
|
274
|
-
"name": "autoWidth",
|
|
275
|
-
"description": "Automatically sets the width of the column based on the column contents when this is set to `true`.\n\nFor performance reasons the column width is calculated automatically only once when the grid items\nare rendered for the first time and the calculation only considers the rows which are currently\nrendered in DOM (a bit more than what is currently visible). If the grid is scrolled, or the cell\ncontent changes, the column width might not match the contents anymore.\n\nHidden columns are ignored in the calculation and their widths are not automatically updated when\nyou show a column that was initially hidden.\n\nYou can manually trigger the auto sizing behavior again by calling `grid.recalculateColumnWidths()`.\n\nThe column width may still grow larger when `flexGrow` is not 0.",
|
|
276
|
-
"value": {
|
|
277
|
-
"type": [
|
|
278
|
-
"boolean"
|
|
279
|
-
]
|
|
280
|
-
}
|
|
281
234
|
}
|
|
282
235
|
],
|
|
283
236
|
"events": []
|
|
284
237
|
}
|
|
285
238
|
},
|
|
286
239
|
{
|
|
287
|
-
"name": "vaadin-grid-column
|
|
288
|
-
"description": "A `<vaadin-grid-column
|
|
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/24.3.0-alpha10/#/elements/vaadin-grid) documentation for instructions on how\nto configure the `<vaadin-grid-column>`.",
|
|
289
242
|
"attributes": [
|
|
290
243
|
{
|
|
291
244
|
"name": "resizable",
|
|
@@ -358,6 +311,68 @@
|
|
|
358
311
|
]
|
|
359
312
|
}
|
|
360
313
|
},
|
|
314
|
+
{
|
|
315
|
+
"name": "header-part-name",
|
|
316
|
+
"description": "Custom part name for the header cell.",
|
|
317
|
+
"value": {
|
|
318
|
+
"type": [
|
|
319
|
+
"string",
|
|
320
|
+
"null",
|
|
321
|
+
"undefined"
|
|
322
|
+
]
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"name": "footer-part-name",
|
|
327
|
+
"description": "Custom part name for the footer cell.",
|
|
328
|
+
"value": {
|
|
329
|
+
"type": [
|
|
330
|
+
"string",
|
|
331
|
+
"null",
|
|
332
|
+
"undefined"
|
|
333
|
+
]
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"name": "width",
|
|
338
|
+
"description": "Width of the cells for this column.",
|
|
339
|
+
"value": {
|
|
340
|
+
"type": [
|
|
341
|
+
"string",
|
|
342
|
+
"null",
|
|
343
|
+
"undefined"
|
|
344
|
+
]
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
"name": "flex-grow",
|
|
349
|
+
"description": "Flex grow ratio for the cell widths. When set to 0, cell width is fixed.",
|
|
350
|
+
"value": {
|
|
351
|
+
"type": [
|
|
352
|
+
"number"
|
|
353
|
+
]
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
"name": "path",
|
|
358
|
+
"description": "Path to an item sub-property whose value gets displayed in the column body cells.\nThe property name is also shown in the column header if an explicit header or renderer isn't defined.",
|
|
359
|
+
"value": {
|
|
360
|
+
"type": [
|
|
361
|
+
"string",
|
|
362
|
+
"null",
|
|
363
|
+
"undefined"
|
|
364
|
+
]
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
"name": "auto-width",
|
|
369
|
+
"description": "Automatically sets the width of the column based on the column contents when this is set to `true`.\n\nFor performance reasons the column width is calculated automatically only once when the grid items\nare rendered for the first time and the calculation only considers the rows which are currently\nrendered in DOM (a bit more than what is currently visible). If the grid is scrolled, or the cell\ncontent changes, the column width might not match the contents anymore.\n\nHidden columns are ignored in the calculation and their widths are not automatically updated when\nyou show a column that was initially hidden.\n\nYou can manually trigger the auto sizing behavior again by calling `grid.recalculateColumnWidths()`.\n\nThe column width may still grow larger when `flexGrow` is not 0.",
|
|
370
|
+
"value": {
|
|
371
|
+
"type": [
|
|
372
|
+
"boolean"
|
|
373
|
+
]
|
|
374
|
+
}
|
|
375
|
+
},
|
|
361
376
|
{
|
|
362
377
|
"name": "theme",
|
|
363
378
|
"description": "The theme variants to apply to the component.",
|
|
@@ -443,6 +458,28 @@
|
|
|
443
458
|
]
|
|
444
459
|
}
|
|
445
460
|
},
|
|
461
|
+
{
|
|
462
|
+
"name": "headerPartName",
|
|
463
|
+
"description": "Custom part name for the header cell.",
|
|
464
|
+
"value": {
|
|
465
|
+
"type": [
|
|
466
|
+
"string",
|
|
467
|
+
"null",
|
|
468
|
+
"undefined"
|
|
469
|
+
]
|
|
470
|
+
}
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
"name": "footerPartName",
|
|
474
|
+
"description": "Custom part name for the footer cell.",
|
|
475
|
+
"value": {
|
|
476
|
+
"type": [
|
|
477
|
+
"string",
|
|
478
|
+
"null",
|
|
479
|
+
"undefined"
|
|
480
|
+
]
|
|
481
|
+
}
|
|
482
|
+
},
|
|
446
483
|
{
|
|
447
484
|
"name": "headerRenderer",
|
|
448
485
|
"description": "Custom function for rendering the header content.\nReceives two arguments:\n\n- `root` The header cell content DOM element. Append your content to it.\n- `column` The `<vaadin-grid-column>` element.",
|
|
@@ -464,6 +501,57 @@
|
|
|
464
501
|
"undefined"
|
|
465
502
|
]
|
|
466
503
|
}
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
"name": "width",
|
|
507
|
+
"description": "Width of the cells for this column.",
|
|
508
|
+
"value": {
|
|
509
|
+
"type": [
|
|
510
|
+
"string",
|
|
511
|
+
"null",
|
|
512
|
+
"undefined"
|
|
513
|
+
]
|
|
514
|
+
}
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
"name": "flexGrow",
|
|
518
|
+
"description": "Flex grow ratio for the cell widths. When set to 0, cell width is fixed.",
|
|
519
|
+
"value": {
|
|
520
|
+
"type": [
|
|
521
|
+
"number"
|
|
522
|
+
]
|
|
523
|
+
}
|
|
524
|
+
},
|
|
525
|
+
{
|
|
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.",
|
|
528
|
+
"value": {
|
|
529
|
+
"type": [
|
|
530
|
+
"GridBodyRenderer",
|
|
531
|
+
"null",
|
|
532
|
+
"undefined"
|
|
533
|
+
]
|
|
534
|
+
}
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
"name": "path",
|
|
538
|
+
"description": "Path to an item sub-property whose value gets displayed in the column body cells.\nThe property name is also shown in the column header if an explicit header or renderer isn't defined.",
|
|
539
|
+
"value": {
|
|
540
|
+
"type": [
|
|
541
|
+
"string",
|
|
542
|
+
"null",
|
|
543
|
+
"undefined"
|
|
544
|
+
]
|
|
545
|
+
}
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
"name": "autoWidth",
|
|
549
|
+
"description": "Automatically sets the width of the column based on the column contents when this is set to `true`.\n\nFor performance reasons the column width is calculated automatically only once when the grid items\nare rendered for the first time and the calculation only considers the rows which are currently\nrendered in DOM (a bit more than what is currently visible). If the grid is scrolled, or the cell\ncontent changes, the column width might not match the contents anymore.\n\nHidden columns are ignored in the calculation and their widths are not automatically updated when\nyou show a column that was initially hidden.\n\nYou can manually trigger the auto sizing behavior again by calling `grid.recalculateColumnWidths()`.\n\nThe column width may still grow larger when `flexGrow` is not 0.",
|
|
550
|
+
"value": {
|
|
551
|
+
"type": [
|
|
552
|
+
"boolean"
|
|
553
|
+
]
|
|
554
|
+
}
|
|
467
555
|
}
|
|
468
556
|
],
|
|
469
557
|
"events": []
|
|
@@ -615,6 +703,28 @@
|
|
|
615
703
|
]
|
|
616
704
|
}
|
|
617
705
|
},
|
|
706
|
+
{
|
|
707
|
+
"name": "header-part-name",
|
|
708
|
+
"description": "Custom part name for the header cell.",
|
|
709
|
+
"value": {
|
|
710
|
+
"type": [
|
|
711
|
+
"string",
|
|
712
|
+
"null",
|
|
713
|
+
"undefined"
|
|
714
|
+
]
|
|
715
|
+
}
|
|
716
|
+
},
|
|
717
|
+
{
|
|
718
|
+
"name": "footer-part-name",
|
|
719
|
+
"description": "Custom part name for the footer cell.",
|
|
720
|
+
"value": {
|
|
721
|
+
"type": [
|
|
722
|
+
"string",
|
|
723
|
+
"null",
|
|
724
|
+
"undefined"
|
|
725
|
+
]
|
|
726
|
+
}
|
|
727
|
+
},
|
|
618
728
|
{
|
|
619
729
|
"name": "width",
|
|
620
730
|
"description": "Width of the cells for this column.",
|
|
@@ -740,6 +850,28 @@
|
|
|
740
850
|
]
|
|
741
851
|
}
|
|
742
852
|
},
|
|
853
|
+
{
|
|
854
|
+
"name": "headerPartName",
|
|
855
|
+
"description": "Custom part name for the header cell.",
|
|
856
|
+
"value": {
|
|
857
|
+
"type": [
|
|
858
|
+
"string",
|
|
859
|
+
"null",
|
|
860
|
+
"undefined"
|
|
861
|
+
]
|
|
862
|
+
}
|
|
863
|
+
},
|
|
864
|
+
{
|
|
865
|
+
"name": "footerPartName",
|
|
866
|
+
"description": "Custom part name for the footer cell.",
|
|
867
|
+
"value": {
|
|
868
|
+
"type": [
|
|
869
|
+
"string",
|
|
870
|
+
"null",
|
|
871
|
+
"undefined"
|
|
872
|
+
]
|
|
873
|
+
}
|
|
874
|
+
},
|
|
743
875
|
{
|
|
744
876
|
"name": "headerRenderer",
|
|
745
877
|
"description": "Custom function for rendering the header content.\nReceives two arguments:\n\n- `root` The header cell content DOM element. Append your content to it.\n- `column` The `<vaadin-grid-column>` element.",
|
|
@@ -819,7 +951,7 @@
|
|
|
819
951
|
},
|
|
820
952
|
{
|
|
821
953
|
"name": "vaadin-grid-selection-column",
|
|
822
|
-
"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 items=\"[[items]]\">\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/24.
|
|
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 items=\"[[items]]\">\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/24.3.0-alpha10/#/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__",
|
|
823
955
|
"attributes": [
|
|
824
956
|
{
|
|
825
957
|
"name": "resizable",
|
|
@@ -893,8 +1025,8 @@
|
|
|
893
1025
|
}
|
|
894
1026
|
},
|
|
895
1027
|
{
|
|
896
|
-
"name": "
|
|
897
|
-
"description": "
|
|
1028
|
+
"name": "header-part-name",
|
|
1029
|
+
"description": "Custom part name for the header cell.",
|
|
898
1030
|
"value": {
|
|
899
1031
|
"type": [
|
|
900
1032
|
"string",
|
|
@@ -904,17 +1036,8 @@
|
|
|
904
1036
|
}
|
|
905
1037
|
},
|
|
906
1038
|
{
|
|
907
|
-
"name": "
|
|
908
|
-
"description": "
|
|
909
|
-
"value": {
|
|
910
|
-
"type": [
|
|
911
|
-
"number"
|
|
912
|
-
]
|
|
913
|
-
}
|
|
914
|
-
},
|
|
915
|
-
{
|
|
916
|
-
"name": "path",
|
|
917
|
-
"description": "Path to an item sub-property whose value gets displayed in the column body cells.\nThe property name is also shown in the column header if an explicit header or renderer isn't defined.",
|
|
1039
|
+
"name": "footer-part-name",
|
|
1040
|
+
"description": "Custom part name for the footer cell.",
|
|
918
1041
|
"value": {
|
|
919
1042
|
"type": [
|
|
920
1043
|
"string",
|
|
@@ -924,35 +1047,39 @@
|
|
|
924
1047
|
}
|
|
925
1048
|
},
|
|
926
1049
|
{
|
|
927
|
-
"name": "
|
|
928
|
-
"description": "
|
|
1050
|
+
"name": "width",
|
|
1051
|
+
"description": "Width of the cells for this column.",
|
|
929
1052
|
"value": {
|
|
930
1053
|
"type": [
|
|
931
|
-
"
|
|
1054
|
+
"string",
|
|
1055
|
+
"null",
|
|
1056
|
+
"undefined"
|
|
932
1057
|
]
|
|
933
1058
|
}
|
|
934
1059
|
},
|
|
935
1060
|
{
|
|
936
|
-
"name": "
|
|
937
|
-
"description": "When
|
|
1061
|
+
"name": "flex-grow",
|
|
1062
|
+
"description": "Flex grow ratio for the cell widths. When set to 0, cell width is fixed.",
|
|
938
1063
|
"value": {
|
|
939
1064
|
"type": [
|
|
940
|
-
"
|
|
1065
|
+
"number"
|
|
941
1066
|
]
|
|
942
1067
|
}
|
|
943
1068
|
},
|
|
944
1069
|
{
|
|
945
|
-
"name": "
|
|
946
|
-
"description": "
|
|
1070
|
+
"name": "path",
|
|
1071
|
+
"description": "Path to an item sub-property whose value gets displayed in the column body cells.\nThe property name is also shown in the column header if an explicit header or renderer isn't defined.",
|
|
947
1072
|
"value": {
|
|
948
1073
|
"type": [
|
|
949
|
-
"
|
|
1074
|
+
"string",
|
|
1075
|
+
"null",
|
|
1076
|
+
"undefined"
|
|
950
1077
|
]
|
|
951
1078
|
}
|
|
952
1079
|
},
|
|
953
1080
|
{
|
|
954
|
-
"name": "
|
|
955
|
-
"description": "
|
|
1081
|
+
"name": "auto-width",
|
|
1082
|
+
"description": "Automatically sets the width of the column based on the column contents when this is set to `true`.\n\nFor performance reasons the column width is calculated automatically only once when the grid items\nare rendered for the first time and the calculation only considers the rows which are currently\nrendered in DOM (a bit more than what is currently visible). If the grid is scrolled, or the cell\ncontent changes, the column width might not match the contents anymore.\n\nHidden columns are ignored in the calculation and their widths are not automatically updated when\nyou show a column that was initially hidden.\n\nYou can manually trigger the auto sizing behavior again by calling `grid.recalculateColumnWidths()`.\n\nThe column width may still grow larger when `flexGrow` is not 0.",
|
|
956
1083
|
"value": {
|
|
957
1084
|
"type": [
|
|
958
1085
|
"boolean"
|
|
@@ -1044,6 +1171,28 @@
|
|
|
1044
1171
|
]
|
|
1045
1172
|
}
|
|
1046
1173
|
},
|
|
1174
|
+
{
|
|
1175
|
+
"name": "headerPartName",
|
|
1176
|
+
"description": "Custom part name for the header cell.",
|
|
1177
|
+
"value": {
|
|
1178
|
+
"type": [
|
|
1179
|
+
"string",
|
|
1180
|
+
"null",
|
|
1181
|
+
"undefined"
|
|
1182
|
+
]
|
|
1183
|
+
}
|
|
1184
|
+
},
|
|
1185
|
+
{
|
|
1186
|
+
"name": "footerPartName",
|
|
1187
|
+
"description": "Custom part name for the footer cell.",
|
|
1188
|
+
"value": {
|
|
1189
|
+
"type": [
|
|
1190
|
+
"string",
|
|
1191
|
+
"null",
|
|
1192
|
+
"undefined"
|
|
1193
|
+
]
|
|
1194
|
+
}
|
|
1195
|
+
},
|
|
1047
1196
|
{
|
|
1048
1197
|
"name": "headerRenderer",
|
|
1049
1198
|
"description": "Custom function for rendering the header content.\nReceives two arguments:\n\n- `root` The header cell content DOM element. Append your content to it.\n- `column` The `<vaadin-grid-column>` element.",
|
|
@@ -1116,41 +1265,9 @@
|
|
|
1116
1265
|
"boolean"
|
|
1117
1266
|
]
|
|
1118
1267
|
}
|
|
1119
|
-
},
|
|
1120
|
-
{
|
|
1121
|
-
"name": "selectAll",
|
|
1122
|
-
"description": "When true, all the items are selected.",
|
|
1123
|
-
"value": {
|
|
1124
|
-
"type": [
|
|
1125
|
-
"boolean"
|
|
1126
|
-
]
|
|
1127
|
-
}
|
|
1128
|
-
},
|
|
1129
|
-
{
|
|
1130
|
-
"name": "autoSelect",
|
|
1131
|
-
"description": "When true, the active gets automatically selected.",
|
|
1132
|
-
"value": {
|
|
1133
|
-
"type": [
|
|
1134
|
-
"boolean"
|
|
1135
|
-
]
|
|
1136
|
-
}
|
|
1137
|
-
},
|
|
1138
|
-
{
|
|
1139
|
-
"name": "dragSelect",
|
|
1140
|
-
"description": "When true, rows can be selected by dragging over the selection column.",
|
|
1141
|
-
"value": {
|
|
1142
|
-
"type": [
|
|
1143
|
-
"boolean"
|
|
1144
|
-
]
|
|
1145
|
-
}
|
|
1146
1268
|
}
|
|
1147
1269
|
],
|
|
1148
|
-
"events": [
|
|
1149
|
-
{
|
|
1150
|
-
"name": "select-all-changed",
|
|
1151
|
-
"description": "Fired when the `selectAll` property changes."
|
|
1152
|
-
}
|
|
1153
|
-
]
|
|
1270
|
+
"events": []
|
|
1154
1271
|
}
|
|
1155
1272
|
},
|
|
1156
1273
|
{
|
|
@@ -1297,6 +1414,28 @@
|
|
|
1297
1414
|
]
|
|
1298
1415
|
}
|
|
1299
1416
|
},
|
|
1417
|
+
{
|
|
1418
|
+
"name": "header-part-name",
|
|
1419
|
+
"description": "Custom part name for the header cell.",
|
|
1420
|
+
"value": {
|
|
1421
|
+
"type": [
|
|
1422
|
+
"string",
|
|
1423
|
+
"null",
|
|
1424
|
+
"undefined"
|
|
1425
|
+
]
|
|
1426
|
+
}
|
|
1427
|
+
},
|
|
1428
|
+
{
|
|
1429
|
+
"name": "footer-part-name",
|
|
1430
|
+
"description": "Custom part name for the footer cell.",
|
|
1431
|
+
"value": {
|
|
1432
|
+
"type": [
|
|
1433
|
+
"string",
|
|
1434
|
+
"null",
|
|
1435
|
+
"undefined"
|
|
1436
|
+
]
|
|
1437
|
+
}
|
|
1438
|
+
},
|
|
1300
1439
|
{
|
|
1301
1440
|
"name": "width",
|
|
1302
1441
|
"description": "Width of the cells for this column.",
|
|
@@ -1432,6 +1571,28 @@
|
|
|
1432
1571
|
]
|
|
1433
1572
|
}
|
|
1434
1573
|
},
|
|
1574
|
+
{
|
|
1575
|
+
"name": "headerPartName",
|
|
1576
|
+
"description": "Custom part name for the header cell.",
|
|
1577
|
+
"value": {
|
|
1578
|
+
"type": [
|
|
1579
|
+
"string",
|
|
1580
|
+
"null",
|
|
1581
|
+
"undefined"
|
|
1582
|
+
]
|
|
1583
|
+
}
|
|
1584
|
+
},
|
|
1585
|
+
{
|
|
1586
|
+
"name": "footerPartName",
|
|
1587
|
+
"description": "Custom part name for the footer cell.",
|
|
1588
|
+
"value": {
|
|
1589
|
+
"type": [
|
|
1590
|
+
"string",
|
|
1591
|
+
"null",
|
|
1592
|
+
"undefined"
|
|
1593
|
+
]
|
|
1594
|
+
}
|
|
1595
|
+
},
|
|
1435
1596
|
{
|
|
1436
1597
|
"name": "headerRenderer",
|
|
1437
1598
|
"description": "Custom function for rendering the header content.\nReceives two arguments:\n\n- `root` The header cell content DOM element. Append your content to it.\n- `column` The `<vaadin-grid-column>` element.",
|
|
@@ -1680,6 +1841,28 @@
|
|
|
1680
1841
|
]
|
|
1681
1842
|
}
|
|
1682
1843
|
},
|
|
1844
|
+
{
|
|
1845
|
+
"name": "header-part-name",
|
|
1846
|
+
"description": "Custom part name for the header cell.",
|
|
1847
|
+
"value": {
|
|
1848
|
+
"type": [
|
|
1849
|
+
"string",
|
|
1850
|
+
"null",
|
|
1851
|
+
"undefined"
|
|
1852
|
+
]
|
|
1853
|
+
}
|
|
1854
|
+
},
|
|
1855
|
+
{
|
|
1856
|
+
"name": "footer-part-name",
|
|
1857
|
+
"description": "Custom part name for the footer cell.",
|
|
1858
|
+
"value": {
|
|
1859
|
+
"type": [
|
|
1860
|
+
"string",
|
|
1861
|
+
"null",
|
|
1862
|
+
"undefined"
|
|
1863
|
+
]
|
|
1864
|
+
}
|
|
1865
|
+
},
|
|
1683
1866
|
{
|
|
1684
1867
|
"name": "width",
|
|
1685
1868
|
"description": "Width of the cells for this column.",
|
|
@@ -1805,6 +1988,28 @@
|
|
|
1805
1988
|
]
|
|
1806
1989
|
}
|
|
1807
1990
|
},
|
|
1991
|
+
{
|
|
1992
|
+
"name": "headerPartName",
|
|
1993
|
+
"description": "Custom part name for the header cell.",
|
|
1994
|
+
"value": {
|
|
1995
|
+
"type": [
|
|
1996
|
+
"string",
|
|
1997
|
+
"null",
|
|
1998
|
+
"undefined"
|
|
1999
|
+
]
|
|
2000
|
+
}
|
|
2001
|
+
},
|
|
2002
|
+
{
|
|
2003
|
+
"name": "footerPartName",
|
|
2004
|
+
"description": "Custom part name for the footer cell.",
|
|
2005
|
+
"value": {
|
|
2006
|
+
"type": [
|
|
2007
|
+
"string",
|
|
2008
|
+
"null",
|
|
2009
|
+
"undefined"
|
|
2010
|
+
]
|
|
2011
|
+
}
|
|
2012
|
+
},
|
|
1808
2013
|
{
|
|
1809
2014
|
"name": "headerRenderer",
|
|
1810
2015
|
"description": "Custom function for rendering the header content.\nReceives two arguments:\n\n- `root` The header cell content DOM element. Append your content to it.\n- `column` The `<vaadin-grid-column>` element.",
|
|
@@ -1884,7 +2089,7 @@
|
|
|
1884
2089
|
},
|
|
1885
2090
|
{
|
|
1886
2091
|
"name": "vaadin-grid",
|
|
1887
|
-
"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/24.2.3/#/elements/vaadin-grid#property-items) property to visualize your data.\n\nUse the [`<vaadin-grid-column>`](https://cdn.vaadin.com/vaadin-web-components/24.2.3/#/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/24.2.3/#/elements/vaadin-grid-column-group)\n- [`<vaadin-grid-filter>`](https://cdn.vaadin.com/vaadin-web-components/24.2.3/#/elements/vaadin-grid-filter)\n- [`<vaadin-grid-sorter>`](https://cdn.vaadin.com/vaadin-web-components/24.2.3/#/elements/vaadin-grid-sorter)\n- [`<vaadin-grid-selection-column>`](https://cdn.vaadin.com/vaadin-web-components/24.2.3/#/elements/vaadin-grid-selection-column)\n- [`<vaadin-grid-tree-toggle>`](https://cdn.vaadin.com/vaadin-web-components/24.2.3/#/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/24.2.3/#/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/24.2.3/#/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`expanded-row` | Expanded row\n`selected-row` | Selected row\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`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 a row that user started to drag (set for one frame)\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`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.",
|
|
2092
|
+
"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/24.3.0-alpha10/#/elements/vaadin-grid#property-items) property to visualize your data.\n\nUse the [`<vaadin-grid-column>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha10/#/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/24.3.0-alpha10/#/elements/vaadin-grid-column-group)\n- [`<vaadin-grid-filter>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha10/#/elements/vaadin-grid-filter)\n- [`<vaadin-grid-sorter>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha10/#/elements/vaadin-grid-sorter)\n- [`<vaadin-grid-selection-column>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha10/#/elements/vaadin-grid-selection-column)\n- [`<vaadin-grid-tree-toggle>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha10/#/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/24.3.0-alpha10/#/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/24.3.0-alpha10/#/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`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`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 a row that user started to drag (set for one frame)\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`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.",
|
|
1888
2093
|
"attributes": [
|
|
1889
2094
|
{
|
|
1890
2095
|
"name": "size",
|