@vaadin/grid 24.2.0-alpha3 → 24.2.0-alpha5
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 +11 -11
- package/src/lit/column-renderer-directives.d.ts +4 -5
- package/src/lit/renderer-directives.d.ts +6 -2
- package/src/vaadin-grid-column.d.ts +11 -0
- package/src/vaadin-grid-column.js +27 -0
- package/src/vaadin-grid-data-provider-mixin.js +4 -1
- package/src/vaadin-grid-selection-column-base-mixin.d.ts +57 -0
- package/src/vaadin-grid-selection-column-base-mixin.js +191 -0
- package/src/vaadin-grid-selection-column.d.ts +3 -12
- package/src/vaadin-grid-selection-column.js +39 -122
- package/web-types.json +94 -201
- package/web-types.lit.json +39 -81
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.2.0-
|
|
4
|
+
"version": "24.2.0-alpha5",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"elements": [
|
|
9
9
|
{
|
|
10
10
|
"name": "vaadin-grid-column",
|
|
11
|
-
"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.2.0-
|
|
11
|
+
"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.2.0-alpha5/#/elements/vaadin-grid) documentation for instructions on how\nto configure the `<vaadin-grid-column>`.",
|
|
12
12
|
"attributes": [
|
|
13
13
|
{
|
|
14
14
|
"name": "resizable",
|
|
@@ -39,6 +39,15 @@
|
|
|
39
39
|
]
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
|
+
{
|
|
43
|
+
"name": "row-header",
|
|
44
|
+
"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.",
|
|
45
|
+
"value": {
|
|
46
|
+
"type": [
|
|
47
|
+
"boolean"
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
},
|
|
42
51
|
{
|
|
43
52
|
"name": "hidden",
|
|
44
53
|
"description": "When set to true, the cells for this column are hidden.",
|
|
@@ -155,6 +164,15 @@
|
|
|
155
164
|
]
|
|
156
165
|
}
|
|
157
166
|
},
|
|
167
|
+
{
|
|
168
|
+
"name": "rowHeader",
|
|
169
|
+
"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.",
|
|
170
|
+
"value": {
|
|
171
|
+
"type": [
|
|
172
|
+
"boolean"
|
|
173
|
+
]
|
|
174
|
+
}
|
|
175
|
+
},
|
|
158
176
|
{
|
|
159
177
|
"name": "hidden",
|
|
160
178
|
"description": "When set to true, the cells for this column are hidden.",
|
|
@@ -298,6 +316,15 @@
|
|
|
298
316
|
]
|
|
299
317
|
}
|
|
300
318
|
},
|
|
319
|
+
{
|
|
320
|
+
"name": "row-header",
|
|
321
|
+
"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.",
|
|
322
|
+
"value": {
|
|
323
|
+
"type": [
|
|
324
|
+
"boolean"
|
|
325
|
+
]
|
|
326
|
+
}
|
|
327
|
+
},
|
|
301
328
|
{
|
|
302
329
|
"name": "hidden",
|
|
303
330
|
"description": "When set to true, the cells for this column are hidden.",
|
|
@@ -374,6 +401,15 @@
|
|
|
374
401
|
]
|
|
375
402
|
}
|
|
376
403
|
},
|
|
404
|
+
{
|
|
405
|
+
"name": "rowHeader",
|
|
406
|
+
"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.",
|
|
407
|
+
"value": {
|
|
408
|
+
"type": [
|
|
409
|
+
"boolean"
|
|
410
|
+
]
|
|
411
|
+
}
|
|
412
|
+
},
|
|
377
413
|
{
|
|
378
414
|
"name": "hidden",
|
|
379
415
|
"description": "When set to true, the cells for this column are hidden.",
|
|
@@ -537,6 +573,15 @@
|
|
|
537
573
|
]
|
|
538
574
|
}
|
|
539
575
|
},
|
|
576
|
+
{
|
|
577
|
+
"name": "row-header",
|
|
578
|
+
"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.",
|
|
579
|
+
"value": {
|
|
580
|
+
"type": [
|
|
581
|
+
"boolean"
|
|
582
|
+
]
|
|
583
|
+
}
|
|
584
|
+
},
|
|
540
585
|
{
|
|
541
586
|
"name": "hidden",
|
|
542
587
|
"description": "When set to true, the cells for this column are hidden.",
|
|
@@ -653,6 +698,15 @@
|
|
|
653
698
|
]
|
|
654
699
|
}
|
|
655
700
|
},
|
|
701
|
+
{
|
|
702
|
+
"name": "rowHeader",
|
|
703
|
+
"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.",
|
|
704
|
+
"value": {
|
|
705
|
+
"type": [
|
|
706
|
+
"boolean"
|
|
707
|
+
]
|
|
708
|
+
}
|
|
709
|
+
},
|
|
656
710
|
{
|
|
657
711
|
"name": "hidden",
|
|
658
712
|
"description": "When set to true, the cells for this column are hidden.",
|
|
@@ -765,70 +819,8 @@
|
|
|
765
819
|
},
|
|
766
820
|
{
|
|
767
821
|
"name": "vaadin-grid-selection-column",
|
|
768
|
-
"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.2.0-
|
|
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.2.0-alpha5/#/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__",
|
|
769
823
|
"attributes": [
|
|
770
|
-
{
|
|
771
|
-
"name": "resizable",
|
|
772
|
-
"description": "When set to true, the column is user-resizable.",
|
|
773
|
-
"value": {
|
|
774
|
-
"type": [
|
|
775
|
-
"boolean",
|
|
776
|
-
"null",
|
|
777
|
-
"undefined"
|
|
778
|
-
]
|
|
779
|
-
}
|
|
780
|
-
},
|
|
781
|
-
{
|
|
782
|
-
"name": "frozen",
|
|
783
|
-
"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.",
|
|
784
|
-
"value": {
|
|
785
|
-
"type": [
|
|
786
|
-
"boolean"
|
|
787
|
-
]
|
|
788
|
-
}
|
|
789
|
-
},
|
|
790
|
-
{
|
|
791
|
-
"name": "frozen-to-end",
|
|
792
|
-
"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.",
|
|
793
|
-
"value": {
|
|
794
|
-
"type": [
|
|
795
|
-
"boolean"
|
|
796
|
-
]
|
|
797
|
-
}
|
|
798
|
-
},
|
|
799
|
-
{
|
|
800
|
-
"name": "hidden",
|
|
801
|
-
"description": "When set to true, the cells for this column are hidden.",
|
|
802
|
-
"value": {
|
|
803
|
-
"type": [
|
|
804
|
-
"boolean",
|
|
805
|
-
"null",
|
|
806
|
-
"undefined"
|
|
807
|
-
]
|
|
808
|
-
}
|
|
809
|
-
},
|
|
810
|
-
{
|
|
811
|
-
"name": "header",
|
|
812
|
-
"description": "Text content to display in the header cell of the column.",
|
|
813
|
-
"value": {
|
|
814
|
-
"type": [
|
|
815
|
-
"string",
|
|
816
|
-
"null",
|
|
817
|
-
"undefined"
|
|
818
|
-
]
|
|
819
|
-
}
|
|
820
|
-
},
|
|
821
|
-
{
|
|
822
|
-
"name": "text-align",
|
|
823
|
-
"description": "Aligns the columns cell content horizontally.\nSupported values: \"start\", \"center\" and \"end\".",
|
|
824
|
-
"value": {
|
|
825
|
-
"type": [
|
|
826
|
-
"GridColumnTextAlign",
|
|
827
|
-
"null",
|
|
828
|
-
"undefined"
|
|
829
|
-
]
|
|
830
|
-
}
|
|
831
|
-
},
|
|
832
824
|
{
|
|
833
825
|
"name": "width",
|
|
834
826
|
"description": "Width of the cells for this column.",
|
|
@@ -849,26 +841,6 @@
|
|
|
849
841
|
]
|
|
850
842
|
}
|
|
851
843
|
},
|
|
852
|
-
{
|
|
853
|
-
"name": "path",
|
|
854
|
-
"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.",
|
|
855
|
-
"value": {
|
|
856
|
-
"type": [
|
|
857
|
-
"string",
|
|
858
|
-
"null",
|
|
859
|
-
"undefined"
|
|
860
|
-
]
|
|
861
|
-
}
|
|
862
|
-
},
|
|
863
|
-
{
|
|
864
|
-
"name": "auto-width",
|
|
865
|
-
"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.",
|
|
866
|
-
"value": {
|
|
867
|
-
"type": [
|
|
868
|
-
"boolean"
|
|
869
|
-
]
|
|
870
|
-
}
|
|
871
|
-
},
|
|
872
844
|
{
|
|
873
845
|
"name": "select-all",
|
|
874
846
|
"description": "When true, all the items are selected.",
|
|
@@ -901,90 +873,6 @@
|
|
|
901
873
|
],
|
|
902
874
|
"js": {
|
|
903
875
|
"properties": [
|
|
904
|
-
{
|
|
905
|
-
"name": "resizable",
|
|
906
|
-
"description": "When set to true, the column is user-resizable.",
|
|
907
|
-
"value": {
|
|
908
|
-
"type": [
|
|
909
|
-
"boolean",
|
|
910
|
-
"null",
|
|
911
|
-
"undefined"
|
|
912
|
-
]
|
|
913
|
-
}
|
|
914
|
-
},
|
|
915
|
-
{
|
|
916
|
-
"name": "frozen",
|
|
917
|
-
"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.",
|
|
918
|
-
"value": {
|
|
919
|
-
"type": [
|
|
920
|
-
"boolean"
|
|
921
|
-
]
|
|
922
|
-
}
|
|
923
|
-
},
|
|
924
|
-
{
|
|
925
|
-
"name": "frozenToEnd",
|
|
926
|
-
"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.",
|
|
927
|
-
"value": {
|
|
928
|
-
"type": [
|
|
929
|
-
"boolean"
|
|
930
|
-
]
|
|
931
|
-
}
|
|
932
|
-
},
|
|
933
|
-
{
|
|
934
|
-
"name": "hidden",
|
|
935
|
-
"description": "When set to true, the cells for this column are hidden.",
|
|
936
|
-
"value": {
|
|
937
|
-
"type": [
|
|
938
|
-
"boolean",
|
|
939
|
-
"null",
|
|
940
|
-
"undefined"
|
|
941
|
-
]
|
|
942
|
-
}
|
|
943
|
-
},
|
|
944
|
-
{
|
|
945
|
-
"name": "header",
|
|
946
|
-
"description": "Text content to display in the header cell of the column.",
|
|
947
|
-
"value": {
|
|
948
|
-
"type": [
|
|
949
|
-
"string",
|
|
950
|
-
"null",
|
|
951
|
-
"undefined"
|
|
952
|
-
]
|
|
953
|
-
}
|
|
954
|
-
},
|
|
955
|
-
{
|
|
956
|
-
"name": "textAlign",
|
|
957
|
-
"description": "Aligns the columns cell content horizontally.\nSupported values: \"start\", \"center\" and \"end\".",
|
|
958
|
-
"value": {
|
|
959
|
-
"type": [
|
|
960
|
-
"GridColumnTextAlign",
|
|
961
|
-
"null",
|
|
962
|
-
"undefined"
|
|
963
|
-
]
|
|
964
|
-
}
|
|
965
|
-
},
|
|
966
|
-
{
|
|
967
|
-
"name": "headerRenderer",
|
|
968
|
-
"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.",
|
|
969
|
-
"value": {
|
|
970
|
-
"type": [
|
|
971
|
-
"GridHeaderFooterRenderer",
|
|
972
|
-
"null",
|
|
973
|
-
"undefined"
|
|
974
|
-
]
|
|
975
|
-
}
|
|
976
|
-
},
|
|
977
|
-
{
|
|
978
|
-
"name": "footerRenderer",
|
|
979
|
-
"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.",
|
|
980
|
-
"value": {
|
|
981
|
-
"type": [
|
|
982
|
-
"GridHeaderFooterRenderer",
|
|
983
|
-
"null",
|
|
984
|
-
"undefined"
|
|
985
|
-
]
|
|
986
|
-
}
|
|
987
|
-
},
|
|
988
876
|
{
|
|
989
877
|
"name": "width",
|
|
990
878
|
"description": "Width of the cells for this column.",
|
|
@@ -1005,37 +893,6 @@
|
|
|
1005
893
|
]
|
|
1006
894
|
}
|
|
1007
895
|
},
|
|
1008
|
-
{
|
|
1009
|
-
"name": "renderer",
|
|
1010
|
-
"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.",
|
|
1011
|
-
"value": {
|
|
1012
|
-
"type": [
|
|
1013
|
-
"GridBodyRenderer",
|
|
1014
|
-
"null",
|
|
1015
|
-
"undefined"
|
|
1016
|
-
]
|
|
1017
|
-
}
|
|
1018
|
-
},
|
|
1019
|
-
{
|
|
1020
|
-
"name": "path",
|
|
1021
|
-
"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.",
|
|
1022
|
-
"value": {
|
|
1023
|
-
"type": [
|
|
1024
|
-
"string",
|
|
1025
|
-
"null",
|
|
1026
|
-
"undefined"
|
|
1027
|
-
]
|
|
1028
|
-
}
|
|
1029
|
-
},
|
|
1030
|
-
{
|
|
1031
|
-
"name": "autoWidth",
|
|
1032
|
-
"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.",
|
|
1033
|
-
"value": {
|
|
1034
|
-
"type": [
|
|
1035
|
-
"boolean"
|
|
1036
|
-
]
|
|
1037
|
-
}
|
|
1038
|
-
},
|
|
1039
896
|
{
|
|
1040
897
|
"name": "selectAll",
|
|
1041
898
|
"description": "When true, all the items are selected.",
|
|
@@ -1165,6 +1022,15 @@
|
|
|
1165
1022
|
]
|
|
1166
1023
|
}
|
|
1167
1024
|
},
|
|
1025
|
+
{
|
|
1026
|
+
"name": "row-header",
|
|
1027
|
+
"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.",
|
|
1028
|
+
"value": {
|
|
1029
|
+
"type": [
|
|
1030
|
+
"boolean"
|
|
1031
|
+
]
|
|
1032
|
+
}
|
|
1033
|
+
},
|
|
1168
1034
|
{
|
|
1169
1035
|
"name": "hidden",
|
|
1170
1036
|
"description": "When set to true, the cells for this column are hidden.",
|
|
@@ -1291,6 +1157,15 @@
|
|
|
1291
1157
|
]
|
|
1292
1158
|
}
|
|
1293
1159
|
},
|
|
1160
|
+
{
|
|
1161
|
+
"name": "rowHeader",
|
|
1162
|
+
"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.",
|
|
1163
|
+
"value": {
|
|
1164
|
+
"type": [
|
|
1165
|
+
"boolean"
|
|
1166
|
+
]
|
|
1167
|
+
}
|
|
1168
|
+
},
|
|
1294
1169
|
{
|
|
1295
1170
|
"name": "hidden",
|
|
1296
1171
|
"description": "When set to true, the cells for this column are hidden.",
|
|
@@ -1530,6 +1405,15 @@
|
|
|
1530
1405
|
]
|
|
1531
1406
|
}
|
|
1532
1407
|
},
|
|
1408
|
+
{
|
|
1409
|
+
"name": "row-header",
|
|
1410
|
+
"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.",
|
|
1411
|
+
"value": {
|
|
1412
|
+
"type": [
|
|
1413
|
+
"boolean"
|
|
1414
|
+
]
|
|
1415
|
+
}
|
|
1416
|
+
},
|
|
1533
1417
|
{
|
|
1534
1418
|
"name": "hidden",
|
|
1535
1419
|
"description": "When set to true, the cells for this column are hidden.",
|
|
@@ -1646,6 +1530,15 @@
|
|
|
1646
1530
|
]
|
|
1647
1531
|
}
|
|
1648
1532
|
},
|
|
1533
|
+
{
|
|
1534
|
+
"name": "rowHeader",
|
|
1535
|
+
"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.",
|
|
1536
|
+
"value": {
|
|
1537
|
+
"type": [
|
|
1538
|
+
"boolean"
|
|
1539
|
+
]
|
|
1540
|
+
}
|
|
1541
|
+
},
|
|
1649
1542
|
{
|
|
1650
1543
|
"name": "hidden",
|
|
1651
1544
|
"description": "When set to true, the cells for this column are hidden.",
|
|
@@ -1758,7 +1651,7 @@
|
|
|
1758
1651
|
},
|
|
1759
1652
|
{
|
|
1760
1653
|
"name": "vaadin-grid",
|
|
1761
|
-
"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.0-alpha3/#/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.0-alpha3/#/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.0-alpha3/#/elements/vaadin-grid-column-group)\n- [`<vaadin-grid-filter>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha3/#/elements/vaadin-grid-filter)\n- [`<vaadin-grid-sorter>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha3/#/elements/vaadin-grid-sorter)\n- [`<vaadin-grid-selection-column>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha3/#/elements/vaadin-grid-selection-column)\n- [`<vaadin-grid-tree-toggle>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha3/#/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.0-alpha3/#/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.0-alpha3/#/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.",
|
|
1654
|
+
"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.0-alpha5/#/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.0-alpha5/#/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.0-alpha5/#/elements/vaadin-grid-column-group)\n- [`<vaadin-grid-filter>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha5/#/elements/vaadin-grid-filter)\n- [`<vaadin-grid-sorter>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha5/#/elements/vaadin-grid-sorter)\n- [`<vaadin-grid-selection-column>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha5/#/elements/vaadin-grid-selection-column)\n- [`<vaadin-grid-tree-toggle>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha5/#/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.0-alpha5/#/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.0-alpha5/#/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.",
|
|
1762
1655
|
"attributes": [
|
|
1763
1656
|
{
|
|
1764
1657
|
"name": "size",
|