@vaadin/grid 25.1.0-beta1 → 25.1.0-beta2
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/custom-elements.json +11 -99
- package/package.json +12 -12
- package/src/vaadin-grid-column-mixin.js +0 -8
- package/src/vaadin-grid-column-reordering-mixin.js +20 -1
- package/src/vaadin-grid-column-resizing-mixin.js +22 -2
- package/src/vaadin-grid-data-provider-mixin.js +0 -2
- package/src/vaadin-grid-keyboard-navigation-mixin.js +0 -1
- package/src/vaadin-grid-mixin.js +4 -1
- package/src/vaadin-grid-selection-column-base-mixin.js +21 -5
- package/src/vaadin-grid-sort-mixin.js +0 -2
- package/src/vaadin-grid-tree-toggle-mixin.js +0 -3
- package/web-types.json +238 -82
- package/web-types.lit.json +4 -4
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.1.0-
|
|
4
|
+
"version": "25.1.0-beta2",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -26,7 +26,9 @@
|
|
|
26
26
|
"description": "When true, the column is frozen. When a column inside of a column group is frozen,\nall of the sibling columns inside the group will get frozen also.",
|
|
27
27
|
"value": {
|
|
28
28
|
"type": [
|
|
29
|
-
"boolean"
|
|
29
|
+
"boolean",
|
|
30
|
+
"null",
|
|
31
|
+
"undefined"
|
|
30
32
|
]
|
|
31
33
|
}
|
|
32
34
|
},
|
|
@@ -35,7 +37,9 @@
|
|
|
35
37
|
"description": "When true, the column is frozen to end of grid.\n\nWhen a column inside of a column group is frozen to end, all of the sibling columns\ninside the group will get frozen to end also.\n\nColumn can not be set as `frozen` and `frozenToEnd` at the same time.",
|
|
36
38
|
"value": {
|
|
37
39
|
"type": [
|
|
38
|
-
"boolean"
|
|
40
|
+
"boolean",
|
|
41
|
+
"null",
|
|
42
|
+
"undefined"
|
|
39
43
|
]
|
|
40
44
|
}
|
|
41
45
|
},
|
|
@@ -88,7 +92,9 @@
|
|
|
88
92
|
"description": "When true, the cells for this column will be rendered with the `role` attribute\nset as `rowheader`, instead of the `gridcell` role value used by default.\n\nWhen a column is set as row header, its cells will be announced by screen readers\nwhile navigating to help user identify the current row as uniquely as possible.",
|
|
89
93
|
"value": {
|
|
90
94
|
"type": [
|
|
91
|
-
"boolean"
|
|
95
|
+
"boolean",
|
|
96
|
+
"null",
|
|
97
|
+
"undefined"
|
|
92
98
|
]
|
|
93
99
|
}
|
|
94
100
|
},
|
|
@@ -144,7 +150,9 @@
|
|
|
144
150
|
"description": "When true, the column is frozen. When a column inside of a column group is frozen,\nall of the sibling columns inside the group will get frozen also.",
|
|
145
151
|
"value": {
|
|
146
152
|
"type": [
|
|
147
|
-
"boolean"
|
|
153
|
+
"boolean",
|
|
154
|
+
"null",
|
|
155
|
+
"undefined"
|
|
148
156
|
]
|
|
149
157
|
}
|
|
150
158
|
},
|
|
@@ -153,7 +161,9 @@
|
|
|
153
161
|
"description": "When true, the column is frozen to end of grid.\n\nWhen a column inside of a column group is frozen to end, all of the sibling columns\ninside the group will get frozen to end also.\n\nColumn can not be set as `frozen` and `frozenToEnd` at the same time.",
|
|
154
162
|
"value": {
|
|
155
163
|
"type": [
|
|
156
|
-
"boolean"
|
|
164
|
+
"boolean",
|
|
165
|
+
"null",
|
|
166
|
+
"undefined"
|
|
157
167
|
]
|
|
158
168
|
}
|
|
159
169
|
},
|
|
@@ -217,7 +227,9 @@
|
|
|
217
227
|
"description": "When true, the cells for this column will be rendered with the `role` attribute\nset as `rowheader`, instead of the `gridcell` role value used by default.\n\nWhen a column is set as row header, its cells will be announced by screen readers\nwhile navigating to help user identify the current row as uniquely as possible.",
|
|
218
228
|
"value": {
|
|
219
229
|
"type": [
|
|
220
|
-
"boolean"
|
|
230
|
+
"boolean",
|
|
231
|
+
"null",
|
|
232
|
+
"undefined"
|
|
221
233
|
]
|
|
222
234
|
}
|
|
223
235
|
},
|
|
@@ -238,14 +250,16 @@
|
|
|
238
250
|
},
|
|
239
251
|
{
|
|
240
252
|
"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.1.0-
|
|
253
|
+
"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.1.0-beta2/#/elements/vaadin-grid) documentation for instructions on how\nto configure the `<vaadin-grid-column>`.",
|
|
242
254
|
"attributes": [
|
|
243
255
|
{
|
|
244
256
|
"name": "auto-width",
|
|
245
257
|
"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.",
|
|
246
258
|
"value": {
|
|
247
259
|
"type": [
|
|
248
|
-
"boolean"
|
|
260
|
+
"boolean",
|
|
261
|
+
"null",
|
|
262
|
+
"undefined"
|
|
249
263
|
]
|
|
250
264
|
}
|
|
251
265
|
},
|
|
@@ -254,7 +268,9 @@
|
|
|
254
268
|
"description": "Flex grow ratio for the cell widths. When set to 0, cell width is fixed.",
|
|
255
269
|
"value": {
|
|
256
270
|
"type": [
|
|
257
|
-
"number"
|
|
271
|
+
"number",
|
|
272
|
+
"null",
|
|
273
|
+
"undefined"
|
|
258
274
|
]
|
|
259
275
|
}
|
|
260
276
|
},
|
|
@@ -274,7 +290,9 @@
|
|
|
274
290
|
"description": "When true, the column is frozen. When a column inside of a column group is frozen,\nall of the sibling columns inside the group will get frozen also.",
|
|
275
291
|
"value": {
|
|
276
292
|
"type": [
|
|
277
|
-
"boolean"
|
|
293
|
+
"boolean",
|
|
294
|
+
"null",
|
|
295
|
+
"undefined"
|
|
278
296
|
]
|
|
279
297
|
}
|
|
280
298
|
},
|
|
@@ -283,7 +301,9 @@
|
|
|
283
301
|
"description": "When true, the column is frozen to end of grid.\n\nWhen a column inside of a column group is frozen to end, all of the sibling columns\ninside the group will get frozen to end also.\n\nColumn can not be set as `frozen` and `frozenToEnd` at the same time.",
|
|
284
302
|
"value": {
|
|
285
303
|
"type": [
|
|
286
|
-
"boolean"
|
|
304
|
+
"boolean",
|
|
305
|
+
"null",
|
|
306
|
+
"undefined"
|
|
287
307
|
]
|
|
288
308
|
}
|
|
289
309
|
},
|
|
@@ -347,7 +367,9 @@
|
|
|
347
367
|
"description": "When true, the cells for this column will be rendered with the `role` attribute\nset as `rowheader`, instead of the `gridcell` role value used by default.\n\nWhen a column is set as row header, its cells will be announced by screen readers\nwhile navigating to help user identify the current row as uniquely as possible.",
|
|
348
368
|
"value": {
|
|
349
369
|
"type": [
|
|
350
|
-
"boolean"
|
|
370
|
+
"boolean",
|
|
371
|
+
"null",
|
|
372
|
+
"undefined"
|
|
351
373
|
]
|
|
352
374
|
}
|
|
353
375
|
},
|
|
@@ -392,7 +414,9 @@
|
|
|
392
414
|
"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.",
|
|
393
415
|
"value": {
|
|
394
416
|
"type": [
|
|
395
|
-
"boolean"
|
|
417
|
+
"boolean",
|
|
418
|
+
"null",
|
|
419
|
+
"undefined"
|
|
396
420
|
]
|
|
397
421
|
}
|
|
398
422
|
},
|
|
@@ -401,7 +425,9 @@
|
|
|
401
425
|
"description": "Flex grow ratio for the cell widths. When set to 0, cell width is fixed.",
|
|
402
426
|
"value": {
|
|
403
427
|
"type": [
|
|
404
|
-
"number"
|
|
428
|
+
"number",
|
|
429
|
+
"null",
|
|
430
|
+
"undefined"
|
|
405
431
|
]
|
|
406
432
|
}
|
|
407
433
|
},
|
|
@@ -432,7 +458,9 @@
|
|
|
432
458
|
"description": "When true, the column is frozen. When a column inside of a column group is frozen,\nall of the sibling columns inside the group will get frozen also.",
|
|
433
459
|
"value": {
|
|
434
460
|
"type": [
|
|
435
|
-
"boolean"
|
|
461
|
+
"boolean",
|
|
462
|
+
"null",
|
|
463
|
+
"undefined"
|
|
436
464
|
]
|
|
437
465
|
}
|
|
438
466
|
},
|
|
@@ -441,7 +469,9 @@
|
|
|
441
469
|
"description": "When true, the column is frozen to end of grid.\n\nWhen a column inside of a column group is frozen to end, all of the sibling columns\ninside the group will get frozen to end also.\n\nColumn can not be set as `frozen` and `frozenToEnd` at the same time.",
|
|
442
470
|
"value": {
|
|
443
471
|
"type": [
|
|
444
|
-
"boolean"
|
|
472
|
+
"boolean",
|
|
473
|
+
"null",
|
|
474
|
+
"undefined"
|
|
445
475
|
]
|
|
446
476
|
}
|
|
447
477
|
},
|
|
@@ -527,7 +557,9 @@
|
|
|
527
557
|
"description": "When true, the cells for this column will be rendered with the `role` attribute\nset as `rowheader`, instead of the `gridcell` role value used by default.\n\nWhen a column is set as row header, its cells will be announced by screen readers\nwhile navigating to help user identify the current row as uniquely as possible.",
|
|
528
558
|
"value": {
|
|
529
559
|
"type": [
|
|
530
|
-
"boolean"
|
|
560
|
+
"boolean",
|
|
561
|
+
"null",
|
|
562
|
+
"undefined"
|
|
531
563
|
]
|
|
532
564
|
}
|
|
533
565
|
},
|
|
@@ -637,7 +669,9 @@
|
|
|
637
669
|
"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.",
|
|
638
670
|
"value": {
|
|
639
671
|
"type": [
|
|
640
|
-
"boolean"
|
|
672
|
+
"boolean",
|
|
673
|
+
"null",
|
|
674
|
+
"undefined"
|
|
641
675
|
]
|
|
642
676
|
}
|
|
643
677
|
},
|
|
@@ -646,7 +680,9 @@
|
|
|
646
680
|
"description": "Flex grow ratio for the cell widths. When set to 0, cell width is fixed.",
|
|
647
681
|
"value": {
|
|
648
682
|
"type": [
|
|
649
|
-
"number"
|
|
683
|
+
"number",
|
|
684
|
+
"null",
|
|
685
|
+
"undefined"
|
|
650
686
|
]
|
|
651
687
|
}
|
|
652
688
|
},
|
|
@@ -666,7 +702,9 @@
|
|
|
666
702
|
"description": "When true, the column is frozen. When a column inside of a column group is frozen,\nall of the sibling columns inside the group will get frozen also.",
|
|
667
703
|
"value": {
|
|
668
704
|
"type": [
|
|
669
|
-
"boolean"
|
|
705
|
+
"boolean",
|
|
706
|
+
"null",
|
|
707
|
+
"undefined"
|
|
670
708
|
]
|
|
671
709
|
}
|
|
672
710
|
},
|
|
@@ -675,7 +713,9 @@
|
|
|
675
713
|
"description": "When true, the column is frozen to end of grid.\n\nWhen a column inside of a column group is frozen to end, all of the sibling columns\ninside the group will get frozen to end also.\n\nColumn can not be set as `frozen` and `frozenToEnd` at the same time.",
|
|
676
714
|
"value": {
|
|
677
715
|
"type": [
|
|
678
|
-
"boolean"
|
|
716
|
+
"boolean",
|
|
717
|
+
"null",
|
|
718
|
+
"undefined"
|
|
679
719
|
]
|
|
680
720
|
}
|
|
681
721
|
},
|
|
@@ -739,7 +779,9 @@
|
|
|
739
779
|
"description": "When true, the cells for this column will be rendered with the `role` attribute\nset as `rowheader`, instead of the `gridcell` role value used by default.\n\nWhen a column is set as row header, its cells will be announced by screen readers\nwhile navigating to help user identify the current row as uniquely as possible.",
|
|
740
780
|
"value": {
|
|
741
781
|
"type": [
|
|
742
|
-
"boolean"
|
|
782
|
+
"boolean",
|
|
783
|
+
"null",
|
|
784
|
+
"undefined"
|
|
743
785
|
]
|
|
744
786
|
}
|
|
745
787
|
},
|
|
@@ -784,7 +826,9 @@
|
|
|
784
826
|
"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.",
|
|
785
827
|
"value": {
|
|
786
828
|
"type": [
|
|
787
|
-
"boolean"
|
|
829
|
+
"boolean",
|
|
830
|
+
"null",
|
|
831
|
+
"undefined"
|
|
788
832
|
]
|
|
789
833
|
}
|
|
790
834
|
},
|
|
@@ -793,7 +837,9 @@
|
|
|
793
837
|
"description": "Flex grow ratio for the cell widths. When set to 0, cell width is fixed.",
|
|
794
838
|
"value": {
|
|
795
839
|
"type": [
|
|
796
|
-
"number"
|
|
840
|
+
"number",
|
|
841
|
+
"null",
|
|
842
|
+
"undefined"
|
|
797
843
|
]
|
|
798
844
|
}
|
|
799
845
|
},
|
|
@@ -824,7 +870,9 @@
|
|
|
824
870
|
"description": "When true, the column is frozen. When a column inside of a column group is frozen,\nall of the sibling columns inside the group will get frozen also.",
|
|
825
871
|
"value": {
|
|
826
872
|
"type": [
|
|
827
|
-
"boolean"
|
|
873
|
+
"boolean",
|
|
874
|
+
"null",
|
|
875
|
+
"undefined"
|
|
828
876
|
]
|
|
829
877
|
}
|
|
830
878
|
},
|
|
@@ -833,7 +881,9 @@
|
|
|
833
881
|
"description": "When true, the column is frozen to end of grid.\n\nWhen a column inside of a column group is frozen to end, all of the sibling columns\ninside the group will get frozen to end also.\n\nColumn can not be set as `frozen` and `frozenToEnd` at the same time.",
|
|
834
882
|
"value": {
|
|
835
883
|
"type": [
|
|
836
|
-
"boolean"
|
|
884
|
+
"boolean",
|
|
885
|
+
"null",
|
|
886
|
+
"undefined"
|
|
837
887
|
]
|
|
838
888
|
}
|
|
839
889
|
},
|
|
@@ -919,7 +969,9 @@
|
|
|
919
969
|
"description": "When true, the cells for this column will be rendered with the `role` attribute\nset as `rowheader`, instead of the `gridcell` role value used by default.\n\nWhen a column is set as row header, its cells will be announced by screen readers\nwhile navigating to help user identify the current row as uniquely as possible.",
|
|
920
970
|
"value": {
|
|
921
971
|
"type": [
|
|
922
|
-
"boolean"
|
|
972
|
+
"boolean",
|
|
973
|
+
"null",
|
|
974
|
+
"undefined"
|
|
923
975
|
]
|
|
924
976
|
}
|
|
925
977
|
},
|
|
@@ -951,14 +1003,16 @@
|
|
|
951
1003
|
},
|
|
952
1004
|
{
|
|
953
1005
|
"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.1.0-
|
|
1006
|
+
"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.1.0-beta2/#/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
1007
|
"attributes": [
|
|
956
1008
|
{
|
|
957
1009
|
"name": "auto-select",
|
|
958
1010
|
"description": "When true, the active item gets automatically selected.",
|
|
959
1011
|
"value": {
|
|
960
1012
|
"type": [
|
|
961
|
-
"boolean"
|
|
1013
|
+
"boolean",
|
|
1014
|
+
"null",
|
|
1015
|
+
"undefined"
|
|
962
1016
|
]
|
|
963
1017
|
}
|
|
964
1018
|
},
|
|
@@ -978,7 +1032,9 @@
|
|
|
978
1032
|
"description": "When true, rows can be selected by dragging over the selection column.",
|
|
979
1033
|
"value": {
|
|
980
1034
|
"type": [
|
|
981
|
-
"boolean"
|
|
1035
|
+
"boolean",
|
|
1036
|
+
"null",
|
|
1037
|
+
"undefined"
|
|
982
1038
|
]
|
|
983
1039
|
}
|
|
984
1040
|
},
|
|
@@ -987,7 +1043,9 @@
|
|
|
987
1043
|
"description": "Flex grow ratio for the cell widths. When set to 0, cell width is fixed.",
|
|
988
1044
|
"value": {
|
|
989
1045
|
"type": [
|
|
990
|
-
"number"
|
|
1046
|
+
"number",
|
|
1047
|
+
"null",
|
|
1048
|
+
"undefined"
|
|
991
1049
|
]
|
|
992
1050
|
}
|
|
993
1051
|
},
|
|
@@ -1007,7 +1065,9 @@
|
|
|
1007
1065
|
"description": "When true, the column is frozen. When a column inside of a column group is frozen,\nall of the sibling columns inside the group will get frozen also.",
|
|
1008
1066
|
"value": {
|
|
1009
1067
|
"type": [
|
|
1010
|
-
"boolean"
|
|
1068
|
+
"boolean",
|
|
1069
|
+
"null",
|
|
1070
|
+
"undefined"
|
|
1011
1071
|
]
|
|
1012
1072
|
}
|
|
1013
1073
|
},
|
|
@@ -1016,7 +1076,9 @@
|
|
|
1016
1076
|
"description": "When true, the column is frozen to end of grid.\n\nWhen a column inside of a column group is frozen to end, all of the sibling columns\ninside the group will get frozen to end also.\n\nColumn can not be set as `frozen` and `frozenToEnd` at the same time.",
|
|
1017
1077
|
"value": {
|
|
1018
1078
|
"type": [
|
|
1019
|
-
"boolean"
|
|
1079
|
+
"boolean",
|
|
1080
|
+
"null",
|
|
1081
|
+
"undefined"
|
|
1020
1082
|
]
|
|
1021
1083
|
}
|
|
1022
1084
|
},
|
|
@@ -1080,7 +1142,9 @@
|
|
|
1080
1142
|
"description": "When true, the cells for this column will be rendered with the `role` attribute\nset as `rowheader`, instead of the `gridcell` role value used by default.\n\nWhen a column is set as row header, its cells will be announced by screen readers\nwhile navigating to help user identify the current row as uniquely as possible.",
|
|
1081
1143
|
"value": {
|
|
1082
1144
|
"type": [
|
|
1083
|
-
"boolean"
|
|
1145
|
+
"boolean",
|
|
1146
|
+
"null",
|
|
1147
|
+
"undefined"
|
|
1084
1148
|
]
|
|
1085
1149
|
}
|
|
1086
1150
|
},
|
|
@@ -1089,7 +1153,9 @@
|
|
|
1089
1153
|
"description": "When true, all the items are selected.",
|
|
1090
1154
|
"value": {
|
|
1091
1155
|
"type": [
|
|
1092
|
-
"boolean"
|
|
1156
|
+
"boolean",
|
|
1157
|
+
"null",
|
|
1158
|
+
"undefined"
|
|
1093
1159
|
]
|
|
1094
1160
|
}
|
|
1095
1161
|
},
|
|
@@ -1134,7 +1200,9 @@
|
|
|
1134
1200
|
"description": "When true, the active item gets automatically selected.",
|
|
1135
1201
|
"value": {
|
|
1136
1202
|
"type": [
|
|
1137
|
-
"boolean"
|
|
1203
|
+
"boolean",
|
|
1204
|
+
"null",
|
|
1205
|
+
"undefined"
|
|
1138
1206
|
]
|
|
1139
1207
|
}
|
|
1140
1208
|
},
|
|
@@ -1154,7 +1222,9 @@
|
|
|
1154
1222
|
"description": "When true, rows can be selected by dragging over the selection column.",
|
|
1155
1223
|
"value": {
|
|
1156
1224
|
"type": [
|
|
1157
|
-
"boolean"
|
|
1225
|
+
"boolean",
|
|
1226
|
+
"null",
|
|
1227
|
+
"undefined"
|
|
1158
1228
|
]
|
|
1159
1229
|
}
|
|
1160
1230
|
},
|
|
@@ -1163,7 +1233,9 @@
|
|
|
1163
1233
|
"description": "Flex grow ratio for the cell widths. When set to 0, cell width is fixed.",
|
|
1164
1234
|
"value": {
|
|
1165
1235
|
"type": [
|
|
1166
|
-
"number"
|
|
1236
|
+
"number",
|
|
1237
|
+
"null",
|
|
1238
|
+
"undefined"
|
|
1167
1239
|
]
|
|
1168
1240
|
}
|
|
1169
1241
|
},
|
|
@@ -1194,7 +1266,9 @@
|
|
|
1194
1266
|
"description": "When true, the column is frozen. When a column inside of a column group is frozen,\nall of the sibling columns inside the group will get frozen also.",
|
|
1195
1267
|
"value": {
|
|
1196
1268
|
"type": [
|
|
1197
|
-
"boolean"
|
|
1269
|
+
"boolean",
|
|
1270
|
+
"null",
|
|
1271
|
+
"undefined"
|
|
1198
1272
|
]
|
|
1199
1273
|
}
|
|
1200
1274
|
},
|
|
@@ -1203,7 +1277,9 @@
|
|
|
1203
1277
|
"description": "When true, the column is frozen to end of grid.\n\nWhen a column inside of a column group is frozen to end, all of the sibling columns\ninside the group will get frozen to end also.\n\nColumn can not be set as `frozen` and `frozenToEnd` at the same time.",
|
|
1204
1278
|
"value": {
|
|
1205
1279
|
"type": [
|
|
1206
|
-
"boolean"
|
|
1280
|
+
"boolean",
|
|
1281
|
+
"null",
|
|
1282
|
+
"undefined"
|
|
1207
1283
|
]
|
|
1208
1284
|
}
|
|
1209
1285
|
},
|
|
@@ -1289,7 +1365,9 @@
|
|
|
1289
1365
|
"description": "When true, the cells for this column will be rendered with the `role` attribute\nset as `rowheader`, instead of the `gridcell` role value used by default.\n\nWhen a column is set as row header, its cells will be announced by screen readers\nwhile navigating to help user identify the current row as uniquely as possible.",
|
|
1290
1366
|
"value": {
|
|
1291
1367
|
"type": [
|
|
1292
|
-
"boolean"
|
|
1368
|
+
"boolean",
|
|
1369
|
+
"null",
|
|
1370
|
+
"undefined"
|
|
1293
1371
|
]
|
|
1294
1372
|
}
|
|
1295
1373
|
},
|
|
@@ -1298,7 +1376,9 @@
|
|
|
1298
1376
|
"description": "When true, all the items are selected.",
|
|
1299
1377
|
"value": {
|
|
1300
1378
|
"type": [
|
|
1301
|
-
"boolean"
|
|
1379
|
+
"boolean",
|
|
1380
|
+
"null",
|
|
1381
|
+
"undefined"
|
|
1302
1382
|
]
|
|
1303
1383
|
}
|
|
1304
1384
|
},
|
|
@@ -1411,7 +1491,9 @@
|
|
|
1411
1491
|
"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.",
|
|
1412
1492
|
"value": {
|
|
1413
1493
|
"type": [
|
|
1414
|
-
"boolean"
|
|
1494
|
+
"boolean",
|
|
1495
|
+
"null",
|
|
1496
|
+
"undefined"
|
|
1415
1497
|
]
|
|
1416
1498
|
}
|
|
1417
1499
|
},
|
|
@@ -1430,7 +1512,9 @@
|
|
|
1430
1512
|
"description": "Flex grow ratio for the cell widths. When set to 0, cell width is fixed.",
|
|
1431
1513
|
"value": {
|
|
1432
1514
|
"type": [
|
|
1433
|
-
"number"
|
|
1515
|
+
"number",
|
|
1516
|
+
"null",
|
|
1517
|
+
"undefined"
|
|
1434
1518
|
]
|
|
1435
1519
|
}
|
|
1436
1520
|
},
|
|
@@ -1450,7 +1534,9 @@
|
|
|
1450
1534
|
"description": "When true, the column is frozen. When a column inside of a column group is frozen,\nall of the sibling columns inside the group will get frozen also.",
|
|
1451
1535
|
"value": {
|
|
1452
1536
|
"type": [
|
|
1453
|
-
"boolean"
|
|
1537
|
+
"boolean",
|
|
1538
|
+
"null",
|
|
1539
|
+
"undefined"
|
|
1454
1540
|
]
|
|
1455
1541
|
}
|
|
1456
1542
|
},
|
|
@@ -1459,7 +1545,9 @@
|
|
|
1459
1545
|
"description": "When true, the column is frozen to end of grid.\n\nWhen a column inside of a column group is frozen to end, all of the sibling columns\ninside the group will get frozen to end also.\n\nColumn can not be set as `frozen` and `frozenToEnd` at the same time.",
|
|
1460
1546
|
"value": {
|
|
1461
1547
|
"type": [
|
|
1462
|
-
"boolean"
|
|
1548
|
+
"boolean",
|
|
1549
|
+
"null",
|
|
1550
|
+
"undefined"
|
|
1463
1551
|
]
|
|
1464
1552
|
}
|
|
1465
1553
|
},
|
|
@@ -1523,7 +1611,9 @@
|
|
|
1523
1611
|
"description": "When true, the cells for this column will be rendered with the `role` attribute\nset as `rowheader`, instead of the `gridcell` role value used by default.\n\nWhen a column is set as row header, its cells will be announced by screen readers\nwhile navigating to help user identify the current row as uniquely as possible.",
|
|
1524
1612
|
"value": {
|
|
1525
1613
|
"type": [
|
|
1526
|
-
"boolean"
|
|
1614
|
+
"boolean",
|
|
1615
|
+
"null",
|
|
1616
|
+
"undefined"
|
|
1527
1617
|
]
|
|
1528
1618
|
}
|
|
1529
1619
|
},
|
|
@@ -1568,7 +1658,9 @@
|
|
|
1568
1658
|
"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.",
|
|
1569
1659
|
"value": {
|
|
1570
1660
|
"type": [
|
|
1571
|
-
"boolean"
|
|
1661
|
+
"boolean",
|
|
1662
|
+
"null",
|
|
1663
|
+
"undefined"
|
|
1572
1664
|
]
|
|
1573
1665
|
}
|
|
1574
1666
|
},
|
|
@@ -1587,7 +1679,9 @@
|
|
|
1587
1679
|
"description": "Flex grow ratio for the cell widths. When set to 0, cell width is fixed.",
|
|
1588
1680
|
"value": {
|
|
1589
1681
|
"type": [
|
|
1590
|
-
"number"
|
|
1682
|
+
"number",
|
|
1683
|
+
"null",
|
|
1684
|
+
"undefined"
|
|
1591
1685
|
]
|
|
1592
1686
|
}
|
|
1593
1687
|
},
|
|
@@ -1618,7 +1712,9 @@
|
|
|
1618
1712
|
"description": "When true, the column is frozen. When a column inside of a column group is frozen,\nall of the sibling columns inside the group will get frozen also.",
|
|
1619
1713
|
"value": {
|
|
1620
1714
|
"type": [
|
|
1621
|
-
"boolean"
|
|
1715
|
+
"boolean",
|
|
1716
|
+
"null",
|
|
1717
|
+
"undefined"
|
|
1622
1718
|
]
|
|
1623
1719
|
}
|
|
1624
1720
|
},
|
|
@@ -1627,7 +1723,9 @@
|
|
|
1627
1723
|
"description": "When true, the column is frozen to end of grid.\n\nWhen a column inside of a column group is frozen to end, all of the sibling columns\ninside the group will get frozen to end also.\n\nColumn can not be set as `frozen` and `frozenToEnd` at the same time.",
|
|
1628
1724
|
"value": {
|
|
1629
1725
|
"type": [
|
|
1630
|
-
"boolean"
|
|
1726
|
+
"boolean",
|
|
1727
|
+
"null",
|
|
1728
|
+
"undefined"
|
|
1631
1729
|
]
|
|
1632
1730
|
}
|
|
1633
1731
|
},
|
|
@@ -1713,7 +1811,9 @@
|
|
|
1713
1811
|
"description": "When true, the cells for this column will be rendered with the `role` attribute\nset as `rowheader`, instead of the `gridcell` role value used by default.\n\nWhen a column is set as row header, its cells will be announced by screen readers\nwhile navigating to help user identify the current row as uniquely as possible.",
|
|
1714
1812
|
"value": {
|
|
1715
1813
|
"type": [
|
|
1716
|
-
"boolean"
|
|
1814
|
+
"boolean",
|
|
1815
|
+
"null",
|
|
1816
|
+
"undefined"
|
|
1717
1817
|
]
|
|
1718
1818
|
}
|
|
1719
1819
|
},
|
|
@@ -1757,7 +1857,9 @@
|
|
|
1757
1857
|
"description": "Sublevel toggle state.",
|
|
1758
1858
|
"value": {
|
|
1759
1859
|
"type": [
|
|
1760
|
-
"boolean"
|
|
1860
|
+
"boolean",
|
|
1861
|
+
"null",
|
|
1862
|
+
"undefined"
|
|
1761
1863
|
]
|
|
1762
1864
|
}
|
|
1763
1865
|
},
|
|
@@ -1766,7 +1868,9 @@
|
|
|
1766
1868
|
"description": "Hides the toggle icon and disables toggling a tree sublevel.",
|
|
1767
1869
|
"value": {
|
|
1768
1870
|
"type": [
|
|
1769
|
-
"boolean"
|
|
1871
|
+
"boolean",
|
|
1872
|
+
"null",
|
|
1873
|
+
"undefined"
|
|
1770
1874
|
]
|
|
1771
1875
|
}
|
|
1772
1876
|
},
|
|
@@ -1775,7 +1879,9 @@
|
|
|
1775
1879
|
"description": "Current level of the tree represented with a horizontal offset\nof the toggle button.",
|
|
1776
1880
|
"value": {
|
|
1777
1881
|
"type": [
|
|
1778
|
-
"number"
|
|
1882
|
+
"number",
|
|
1883
|
+
"null",
|
|
1884
|
+
"undefined"
|
|
1779
1885
|
]
|
|
1780
1886
|
}
|
|
1781
1887
|
},
|
|
@@ -1798,7 +1904,9 @@
|
|
|
1798
1904
|
"description": "Sublevel toggle state.",
|
|
1799
1905
|
"value": {
|
|
1800
1906
|
"type": [
|
|
1801
|
-
"boolean"
|
|
1907
|
+
"boolean",
|
|
1908
|
+
"null",
|
|
1909
|
+
"undefined"
|
|
1802
1910
|
]
|
|
1803
1911
|
}
|
|
1804
1912
|
},
|
|
@@ -1807,7 +1915,9 @@
|
|
|
1807
1915
|
"description": "Hides the toggle icon and disables toggling a tree sublevel.",
|
|
1808
1916
|
"value": {
|
|
1809
1917
|
"type": [
|
|
1810
|
-
"boolean"
|
|
1918
|
+
"boolean",
|
|
1919
|
+
"null",
|
|
1920
|
+
"undefined"
|
|
1811
1921
|
]
|
|
1812
1922
|
}
|
|
1813
1923
|
},
|
|
@@ -1816,7 +1926,9 @@
|
|
|
1816
1926
|
"description": "Current level of the tree represented with a horizontal offset\nof the toggle button.",
|
|
1817
1927
|
"value": {
|
|
1818
1928
|
"type": [
|
|
1819
|
-
"number"
|
|
1929
|
+
"number",
|
|
1930
|
+
"null",
|
|
1931
|
+
"undefined"
|
|
1820
1932
|
]
|
|
1821
1933
|
}
|
|
1822
1934
|
}
|
|
@@ -1838,7 +1950,9 @@
|
|
|
1838
1950
|
"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.",
|
|
1839
1951
|
"value": {
|
|
1840
1952
|
"type": [
|
|
1841
|
-
"boolean"
|
|
1953
|
+
"boolean",
|
|
1954
|
+
"null",
|
|
1955
|
+
"undefined"
|
|
1842
1956
|
]
|
|
1843
1957
|
}
|
|
1844
1958
|
},
|
|
@@ -1847,7 +1961,9 @@
|
|
|
1847
1961
|
"description": "Flex grow ratio for the cell widths. When set to 0, cell width is fixed.",
|
|
1848
1962
|
"value": {
|
|
1849
1963
|
"type": [
|
|
1850
|
-
"number"
|
|
1964
|
+
"number",
|
|
1965
|
+
"null",
|
|
1966
|
+
"undefined"
|
|
1851
1967
|
]
|
|
1852
1968
|
}
|
|
1853
1969
|
},
|
|
@@ -1867,7 +1983,9 @@
|
|
|
1867
1983
|
"description": "When true, the column is frozen. When a column inside of a column group is frozen,\nall of the sibling columns inside the group will get frozen also.",
|
|
1868
1984
|
"value": {
|
|
1869
1985
|
"type": [
|
|
1870
|
-
"boolean"
|
|
1986
|
+
"boolean",
|
|
1987
|
+
"null",
|
|
1988
|
+
"undefined"
|
|
1871
1989
|
]
|
|
1872
1990
|
}
|
|
1873
1991
|
},
|
|
@@ -1876,7 +1994,9 @@
|
|
|
1876
1994
|
"description": "When true, the column is frozen to end of grid.\n\nWhen a column inside of a column group is frozen to end, all of the sibling columns\ninside the group will get frozen to end also.\n\nColumn can not be set as `frozen` and `frozenToEnd` at the same time.",
|
|
1877
1995
|
"value": {
|
|
1878
1996
|
"type": [
|
|
1879
|
-
"boolean"
|
|
1997
|
+
"boolean",
|
|
1998
|
+
"null",
|
|
1999
|
+
"undefined"
|
|
1880
2000
|
]
|
|
1881
2001
|
}
|
|
1882
2002
|
},
|
|
@@ -1940,7 +2060,9 @@
|
|
|
1940
2060
|
"description": "When true, the cells for this column will be rendered with the `role` attribute\nset as `rowheader`, instead of the `gridcell` role value used by default.\n\nWhen a column is set as row header, its cells will be announced by screen readers\nwhile navigating to help user identify the current row as uniquely as possible.",
|
|
1941
2061
|
"value": {
|
|
1942
2062
|
"type": [
|
|
1943
|
-
"boolean"
|
|
2063
|
+
"boolean",
|
|
2064
|
+
"null",
|
|
2065
|
+
"undefined"
|
|
1944
2066
|
]
|
|
1945
2067
|
}
|
|
1946
2068
|
},
|
|
@@ -1985,7 +2107,9 @@
|
|
|
1985
2107
|
"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.",
|
|
1986
2108
|
"value": {
|
|
1987
2109
|
"type": [
|
|
1988
|
-
"boolean"
|
|
2110
|
+
"boolean",
|
|
2111
|
+
"null",
|
|
2112
|
+
"undefined"
|
|
1989
2113
|
]
|
|
1990
2114
|
}
|
|
1991
2115
|
},
|
|
@@ -1994,7 +2118,9 @@
|
|
|
1994
2118
|
"description": "Flex grow ratio for the cell widths. When set to 0, cell width is fixed.",
|
|
1995
2119
|
"value": {
|
|
1996
2120
|
"type": [
|
|
1997
|
-
"number"
|
|
2121
|
+
"number",
|
|
2122
|
+
"null",
|
|
2123
|
+
"undefined"
|
|
1998
2124
|
]
|
|
1999
2125
|
}
|
|
2000
2126
|
},
|
|
@@ -2025,7 +2151,9 @@
|
|
|
2025
2151
|
"description": "When true, the column is frozen. When a column inside of a column group is frozen,\nall of the sibling columns inside the group will get frozen also.",
|
|
2026
2152
|
"value": {
|
|
2027
2153
|
"type": [
|
|
2028
|
-
"boolean"
|
|
2154
|
+
"boolean",
|
|
2155
|
+
"null",
|
|
2156
|
+
"undefined"
|
|
2029
2157
|
]
|
|
2030
2158
|
}
|
|
2031
2159
|
},
|
|
@@ -2034,7 +2162,9 @@
|
|
|
2034
2162
|
"description": "When true, the column is frozen to end of grid.\n\nWhen a column inside of a column group is frozen to end, all of the sibling columns\ninside the group will get frozen to end also.\n\nColumn can not be set as `frozen` and `frozenToEnd` at the same time.",
|
|
2035
2163
|
"value": {
|
|
2036
2164
|
"type": [
|
|
2037
|
-
"boolean"
|
|
2165
|
+
"boolean",
|
|
2166
|
+
"null",
|
|
2167
|
+
"undefined"
|
|
2038
2168
|
]
|
|
2039
2169
|
}
|
|
2040
2170
|
},
|
|
@@ -2120,7 +2250,9 @@
|
|
|
2120
2250
|
"description": "When true, the cells for this column will be rendered with the `role` attribute\nset as `rowheader`, instead of the `gridcell` role value used by default.\n\nWhen a column is set as row header, its cells will be announced by screen readers\nwhile navigating to help user identify the current row as uniquely as possible.",
|
|
2121
2251
|
"value": {
|
|
2122
2252
|
"type": [
|
|
2123
|
-
"boolean"
|
|
2253
|
+
"boolean",
|
|
2254
|
+
"null",
|
|
2255
|
+
"undefined"
|
|
2124
2256
|
]
|
|
2125
2257
|
}
|
|
2126
2258
|
},
|
|
@@ -2152,7 +2284,7 @@
|
|
|
2152
2284
|
},
|
|
2153
2285
|
{
|
|
2154
2286
|
"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.1.0-beta1/#/elements/vaadin-grid#property-items) property to visualize your data.\n\nUse the [`<vaadin-grid-column>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-beta1/#/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.1.0-beta1/#/elements/vaadin-grid-column-group)\n- [`<vaadin-grid-filter>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-beta1/#/elements/vaadin-grid-filter)\n- [`<vaadin-grid-sorter>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-beta1/#/elements/vaadin-grid-sorter)\n- [`<vaadin-grid-selection-column>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-beta1/#/elements/vaadin-grid-selection-column)\n- [`<vaadin-grid-tree-toggle>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-beta1/#/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.1.0-beta1/#/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.1.0-beta1/#/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`header-row` | Header row in the internal table\n`footer-row` | Footer 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`first-header-row` | The first header row\n`first-footer-row` | The first footer row\n`last-row` | The last body row\n`last-header-row` | The last header row\n`last-footer-row` | The last footer 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.",
|
|
2287
|
+
"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.1.0-beta2/#/elements/vaadin-grid#property-items) property to visualize your data.\n\nUse the [`<vaadin-grid-column>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-beta2/#/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.1.0-beta2/#/elements/vaadin-grid-column-group)\n- [`<vaadin-grid-filter>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-beta2/#/elements/vaadin-grid-filter)\n- [`<vaadin-grid-sorter>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-beta2/#/elements/vaadin-grid-sorter)\n- [`<vaadin-grid-selection-column>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-beta2/#/elements/vaadin-grid-selection-column)\n- [`<vaadin-grid-tree-toggle>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-beta2/#/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.1.0-beta2/#/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.1.0-beta2/#/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`header-row` | Header row in the internal table\n`footer-row` | Footer 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`first-header-row` | The first header row\n`first-footer-row` | The first footer row\n`last-row` | The last body row\n`last-header-row` | The last header row\n`last-footer-row` | The last footer 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
2288
|
"attributes": [
|
|
2157
2289
|
{
|
|
2158
2290
|
"name": "accessible-name",
|
|
@@ -2170,7 +2302,9 @@
|
|
|
2170
2302
|
"description": "If true, the grid's height is defined by its rows.\n\nEffectively, this disables the grid's virtual scrolling so that all the rows are rendered in the DOM at once.\nIf the grid has a large number of items, using the feature is discouraged to avoid performance issues.",
|
|
2171
2303
|
"value": {
|
|
2172
2304
|
"type": [
|
|
2173
|
-
"boolean"
|
|
2305
|
+
"boolean",
|
|
2306
|
+
"null",
|
|
2307
|
+
"undefined"
|
|
2174
2308
|
]
|
|
2175
2309
|
}
|
|
2176
2310
|
},
|
|
@@ -2188,7 +2322,9 @@
|
|
|
2188
2322
|
"description": "Set to true to allow column reordering.",
|
|
2189
2323
|
"value": {
|
|
2190
2324
|
"type": [
|
|
2191
|
-
"boolean"
|
|
2325
|
+
"boolean",
|
|
2326
|
+
"null",
|
|
2327
|
+
"undefined"
|
|
2192
2328
|
]
|
|
2193
2329
|
}
|
|
2194
2330
|
},
|
|
@@ -2230,7 +2366,9 @@
|
|
|
2230
2366
|
"description": "When `true`, all `<vaadin-grid-sorter>` are applied for sorting.",
|
|
2231
2367
|
"value": {
|
|
2232
2368
|
"type": [
|
|
2233
|
-
"boolean"
|
|
2369
|
+
"boolean",
|
|
2370
|
+
"null",
|
|
2371
|
+
"undefined"
|
|
2234
2372
|
]
|
|
2235
2373
|
}
|
|
2236
2374
|
},
|
|
@@ -2239,7 +2377,9 @@
|
|
|
2239
2377
|
"description": "When `true`, Shift-clicking an unsorted column's sorter adds it to the multi-sort.\nShift + Space does the same action via keyboard. This property has precedence over the\n`multiSort` property. If `multiSortOnShiftClick` is true, the multiSort property is effectively ignored.",
|
|
2240
2378
|
"value": {
|
|
2241
2379
|
"type": [
|
|
2242
|
-
"boolean"
|
|
2380
|
+
"boolean",
|
|
2381
|
+
"null",
|
|
2382
|
+
"undefined"
|
|
2243
2383
|
]
|
|
2244
2384
|
}
|
|
2245
2385
|
},
|
|
@@ -2259,7 +2399,9 @@
|
|
|
2259
2399
|
"description": "Number of items fetched at a time from the dataprovider.",
|
|
2260
2400
|
"value": {
|
|
2261
2401
|
"type": [
|
|
2262
|
-
"number"
|
|
2402
|
+
"number",
|
|
2403
|
+
"null",
|
|
2404
|
+
"undefined"
|
|
2263
2405
|
]
|
|
2264
2406
|
}
|
|
2265
2407
|
},
|
|
@@ -2279,7 +2421,9 @@
|
|
|
2279
2421
|
"description": "The number of root-level items in the grid.",
|
|
2280
2422
|
"value": {
|
|
2281
2423
|
"type": [
|
|
2282
|
-
"number"
|
|
2424
|
+
"number",
|
|
2425
|
+
"null",
|
|
2426
|
+
"undefined"
|
|
2283
2427
|
]
|
|
2284
2428
|
}
|
|
2285
2429
|
},
|
|
@@ -2322,7 +2466,9 @@
|
|
|
2322
2466
|
"description": "If true, the grid's height is defined by its rows.\n\nEffectively, this disables the grid's virtual scrolling so that all the rows are rendered in the DOM at once.\nIf the grid has a large number of items, using the feature is discouraged to avoid performance issues.",
|
|
2323
2467
|
"value": {
|
|
2324
2468
|
"type": [
|
|
2325
|
-
"boolean"
|
|
2469
|
+
"boolean",
|
|
2470
|
+
"null",
|
|
2471
|
+
"undefined"
|
|
2326
2472
|
]
|
|
2327
2473
|
}
|
|
2328
2474
|
},
|
|
@@ -2351,7 +2497,9 @@
|
|
|
2351
2497
|
"description": "Set to true to allow column reordering.",
|
|
2352
2498
|
"value": {
|
|
2353
2499
|
"type": [
|
|
2354
|
-
"boolean"
|
|
2500
|
+
"boolean",
|
|
2501
|
+
"null",
|
|
2502
|
+
"undefined"
|
|
2355
2503
|
]
|
|
2356
2504
|
}
|
|
2357
2505
|
},
|
|
@@ -2465,7 +2613,9 @@
|
|
|
2465
2613
|
"description": "When `true`, all `<vaadin-grid-sorter>` are applied for sorting.",
|
|
2466
2614
|
"value": {
|
|
2467
2615
|
"type": [
|
|
2468
|
-
"boolean"
|
|
2616
|
+
"boolean",
|
|
2617
|
+
"null",
|
|
2618
|
+
"undefined"
|
|
2469
2619
|
]
|
|
2470
2620
|
}
|
|
2471
2621
|
},
|
|
@@ -2474,7 +2624,9 @@
|
|
|
2474
2624
|
"description": "When `true`, Shift-clicking an unsorted column's sorter adds it to the multi-sort.\nShift + Space does the same action via keyboard. This property has precedence over the\n`multiSort` property. If `multiSortOnShiftClick` is true, the multiSort property is effectively ignored.",
|
|
2475
2625
|
"value": {
|
|
2476
2626
|
"type": [
|
|
2477
|
-
"boolean"
|
|
2627
|
+
"boolean",
|
|
2628
|
+
"null",
|
|
2629
|
+
"undefined"
|
|
2478
2630
|
]
|
|
2479
2631
|
}
|
|
2480
2632
|
},
|
|
@@ -2494,7 +2646,9 @@
|
|
|
2494
2646
|
"description": "Number of items fetched at a time from the dataprovider.",
|
|
2495
2647
|
"value": {
|
|
2496
2648
|
"type": [
|
|
2497
|
-
"number"
|
|
2649
|
+
"number",
|
|
2650
|
+
"null",
|
|
2651
|
+
"undefined"
|
|
2498
2652
|
]
|
|
2499
2653
|
}
|
|
2500
2654
|
},
|
|
@@ -2534,7 +2688,9 @@
|
|
|
2534
2688
|
"description": "The number of root-level items in the grid.",
|
|
2535
2689
|
"value": {
|
|
2536
2690
|
"type": [
|
|
2537
|
-
"number"
|
|
2691
|
+
"number",
|
|
2692
|
+
"null",
|
|
2693
|
+
"undefined"
|
|
2538
2694
|
]
|
|
2539
2695
|
}
|
|
2540
2696
|
}
|