@vaadin/grid 25.4.0-alpha3 → 25.4.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/custom-elements.json +290 -963
- package/package.json +12 -12
- package/src/styles/vaadin-grid-base-styles.js +28 -9
- package/src/vaadin-grid-a11y-mixin.js +1 -1
- package/src/vaadin-grid-column-mixin.d.ts +1 -0
- package/src/vaadin-grid-column-mixin.js +26 -6
- package/src/vaadin-grid-drag-and-drop-mixin.js +4 -3
- package/src/vaadin-grid-helpers.js +3 -4
- package/src/vaadin-grid-mixin.js +8 -4
- package/src/vaadin-grid-row-details-mixin.js +1 -1
- package/src/vaadin-grid-scroll-mixin.js +19 -1
- package/src/vaadin-grid-selection-column-base-mixin.js +2 -1
- package/web-types.json +37 -25
- package/web-types.lit.json +8 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/grid",
|
|
3
|
-
"version": "25.4.0-
|
|
3
|
+
"version": "25.4.0-alpha5",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
48
|
-
"@vaadin/a11y-base": "25.4.0-
|
|
49
|
-
"@vaadin/checkbox": "25.4.0-
|
|
50
|
-
"@vaadin/component-base": "25.4.0-
|
|
51
|
-
"@vaadin/lit-renderer": "25.4.0-
|
|
52
|
-
"@vaadin/text-field": "25.4.0-
|
|
53
|
-
"@vaadin/vaadin-themable-mixin": "25.4.0-
|
|
48
|
+
"@vaadin/a11y-base": "25.4.0-alpha5",
|
|
49
|
+
"@vaadin/checkbox": "25.4.0-alpha5",
|
|
50
|
+
"@vaadin/component-base": "25.4.0-alpha5",
|
|
51
|
+
"@vaadin/lit-renderer": "25.4.0-alpha5",
|
|
52
|
+
"@vaadin/text-field": "25.4.0-alpha5",
|
|
53
|
+
"@vaadin/vaadin-themable-mixin": "25.4.0-alpha5",
|
|
54
54
|
"lit": "^3.0.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@vaadin/aura": "25.4.0-
|
|
58
|
-
"@vaadin/chai-plugins": "25.4.0-
|
|
59
|
-
"@vaadin/test-runner-commands": "25.4.0-
|
|
57
|
+
"@vaadin/aura": "25.4.0-alpha5",
|
|
58
|
+
"@vaadin/chai-plugins": "25.4.0-alpha5",
|
|
59
|
+
"@vaadin/test-runner-commands": "25.4.0-alpha5",
|
|
60
60
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
61
|
-
"@vaadin/vaadin-lumo-styles": "25.4.0-
|
|
61
|
+
"@vaadin/vaadin-lumo-styles": "25.4.0-alpha5",
|
|
62
62
|
"sinon": "^22.0.0"
|
|
63
63
|
},
|
|
64
64
|
"customElements": "custom-elements.json",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"web-types.json",
|
|
67
67
|
"web-types.lit.json"
|
|
68
68
|
],
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "65e9c9e49c0a723b08ee91b9aae8b901e91a3597"
|
|
70
70
|
}
|
|
@@ -127,6 +127,11 @@ export const gridStyles = css`
|
|
|
127
127
|
box-sizing: border-box;
|
|
128
128
|
margin: 0;
|
|
129
129
|
position: relative;
|
|
130
|
+
/* Browser default tr styles use vertical-align: inherit and border-color: inherit,
|
|
131
|
+
which force every row to restyle when #items, #header or #footer gets a new
|
|
132
|
+
transform on horizontal scroll. Resetting them makes horizontal scrolling faster. */
|
|
133
|
+
vertical-align: initial;
|
|
134
|
+
border-color: initial;
|
|
130
135
|
}
|
|
131
136
|
|
|
132
137
|
.row:not(:focus-within) {
|
|
@@ -226,7 +231,7 @@ export const gridStyles = css`
|
|
|
226
231
|
|
|
227
232
|
/* Block borders / Last body row */
|
|
228
233
|
|
|
229
|
-
.last-row::after {
|
|
234
|
+
#table[has-footer] .last-row::after {
|
|
230
235
|
bottom: 0;
|
|
231
236
|
}
|
|
232
237
|
|
|
@@ -237,16 +242,26 @@ export const gridStyles = css`
|
|
|
237
242
|
|
|
238
243
|
/* Block borders / Last body row without footer */
|
|
239
244
|
|
|
245
|
+
#table:not([has-footer]) {
|
|
246
|
+
/* Push the bottom border out of the row box, so the row height does not include it */
|
|
247
|
+
.last-row .details-cell,
|
|
248
|
+
.last-row-cell {
|
|
249
|
+
margin-bottom: calc(var(--_row-border-width) * -1);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/* Treat the border outside the row box as ink overflow, so it does not extend the scroll range */
|
|
253
|
+
.last-row {
|
|
254
|
+
contain: layout;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
240
258
|
:host([all-rows-visible]),
|
|
241
259
|
:host([overflow~='top']),
|
|
242
260
|
:host([overflow~='bottom']) {
|
|
243
|
-
#table:not([has-footer]) .last-row
|
|
244
|
-
#table:not([has-footer]) .last-row
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
&::after {
|
|
248
|
-
bottom: 0;
|
|
249
|
-
}
|
|
261
|
+
#table:not([has-footer]) .last-row::after,
|
|
262
|
+
#table:not([has-footer]) .last-row .details-cell::after,
|
|
263
|
+
#table:not([has-footer]) .last-row-cell:not(.details-opened-row-cell)::after {
|
|
264
|
+
bottom: 0;
|
|
250
265
|
}
|
|
251
266
|
}
|
|
252
267
|
|
|
@@ -312,10 +327,14 @@ export const gridStyles = css`
|
|
|
312
327
|
var(--vaadin-grid-cell-background-color, transparent)
|
|
313
328
|
);
|
|
314
329
|
|
|
315
|
-
background-color:
|
|
330
|
+
background-color: var(--vaadin-grid-row-background-color, var(--vaadin-background-color));
|
|
316
331
|
background-repeat: no-repeat;
|
|
317
332
|
background-origin: padding-box;
|
|
318
333
|
background-image: var(--_cell-background-image);
|
|
334
|
+
|
|
335
|
+
/* Browser default td styles use vertical-align: inherit, which forces every
|
|
336
|
+
cell in a row to restyle when the row's style changes. */
|
|
337
|
+
vertical-align: initial;
|
|
319
338
|
}
|
|
320
339
|
|
|
321
340
|
.body-cell {
|
|
@@ -56,7 +56,7 @@ export const A11yMixin = (superClass) =>
|
|
|
56
56
|
|
|
57
57
|
this.$.table.setAttribute('aria-rowcount', rowsCount);
|
|
58
58
|
|
|
59
|
-
const bodyColumns = _columnTree
|
|
59
|
+
const bodyColumns = _columnTree.at(-1);
|
|
60
60
|
|
|
61
61
|
// If no header and footer rows while the empty state is active, count as one column
|
|
62
62
|
// Otherwise, use the number of body columns, if present
|
|
@@ -121,6 +121,7 @@ export declare class GridColumnMixinClass<
|
|
|
121
121
|
> extends ColumnBaseMixinClass<TItem, Column> {
|
|
122
122
|
/**
|
|
123
123
|
* Width of the cells for this column.
|
|
124
|
+
* Setting the property to `null` or `undefined` restores the default width.
|
|
124
125
|
*
|
|
125
126
|
* Please note that using the `em` length unit is discouraged as
|
|
126
127
|
* it might lead to misalignment issues if the header, body, and footer
|
|
@@ -12,6 +12,9 @@ import { updateCellState } from './vaadin-grid-helpers.js';
|
|
|
12
12
|
|
|
13
13
|
export const ColumnBaseMixin = (superClass) =>
|
|
14
14
|
class ColumnBaseMixin extends superClass {
|
|
15
|
+
/** @type {Grid | undefined} */
|
|
16
|
+
#cachedGrid;
|
|
17
|
+
|
|
15
18
|
static get properties() {
|
|
16
19
|
return {
|
|
17
20
|
/**
|
|
@@ -273,10 +276,8 @@ export const ColumnBaseMixin = (superClass) =>
|
|
|
273
276
|
* @protected
|
|
274
277
|
*/
|
|
275
278
|
get _grid() {
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
}
|
|
279
|
-
return this._gridValue;
|
|
279
|
+
this.#cachedGrid ??= this._findHostGrid();
|
|
280
|
+
return this.#cachedGrid;
|
|
280
281
|
}
|
|
281
282
|
|
|
282
283
|
/**
|
|
@@ -340,7 +341,7 @@ export const ColumnBaseMixin = (superClass) =>
|
|
|
340
341
|
});
|
|
341
342
|
});
|
|
342
343
|
|
|
343
|
-
this
|
|
344
|
+
this.#cachedGrid = undefined;
|
|
344
345
|
}
|
|
345
346
|
|
|
346
347
|
/**
|
|
@@ -374,7 +375,7 @@ export const ColumnBaseMixin = (superClass) =>
|
|
|
374
375
|
});
|
|
375
376
|
}
|
|
376
377
|
|
|
377
|
-
/** @
|
|
378
|
+
/** @protected */
|
|
378
379
|
_widthChanged(width) {
|
|
379
380
|
this.parentElement?._columnPropChanged?.('width');
|
|
380
381
|
|
|
@@ -757,6 +758,7 @@ export const GridColumnMixin = (superClass) =>
|
|
|
757
758
|
return {
|
|
758
759
|
/**
|
|
759
760
|
* Width of the cells for this column.
|
|
761
|
+
* Setting the property to `null` or `undefined` restores the default width.
|
|
760
762
|
*
|
|
761
763
|
* Please note that using the `em` length unit is discouraged as
|
|
762
764
|
* it might lead to misalignment issues if the header, body, and footer
|
|
@@ -867,4 +869,22 @@ export const GridColumnMixin = (superClass) =>
|
|
|
867
869
|
},
|
|
868
870
|
};
|
|
869
871
|
}
|
|
872
|
+
|
|
873
|
+
/**
|
|
874
|
+
* Override method from `ColumnBaseMixin` to restore the default width
|
|
875
|
+
* when the property is set to `null` or `undefined`.
|
|
876
|
+
*
|
|
877
|
+
* @param {string | null | undefined} width
|
|
878
|
+
* @protected
|
|
879
|
+
* @override
|
|
880
|
+
*/
|
|
881
|
+
_widthChanged(width) {
|
|
882
|
+
if (width == null) {
|
|
883
|
+
// Read the default from the property options, as e.g. the selection column overrides it
|
|
884
|
+
this.width = this.constructor.elementProperties.get('width').value;
|
|
885
|
+
return;
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
super._widthChanged(width);
|
|
889
|
+
}
|
|
870
890
|
};
|
|
@@ -7,6 +7,7 @@ import { isChrome, isSafari } from '@vaadin/component-base/src/browser-utils.js'
|
|
|
7
7
|
import { setOrRemoveAttribute } from '@vaadin/component-base/src/dom-utils.js';
|
|
8
8
|
import {
|
|
9
9
|
getBodyRowCells,
|
|
10
|
+
getClosestCell,
|
|
10
11
|
iterateChildren,
|
|
11
12
|
iterateRowCells,
|
|
12
13
|
updateBooleanRowStates,
|
|
@@ -149,10 +150,10 @@ export const DragAndDropMixin = (superClass) =>
|
|
|
149
150
|
if (this.rowsDraggable) {
|
|
150
151
|
let row = e.target;
|
|
151
152
|
if (row.localName === 'vaadin-grid-cell-content') {
|
|
152
|
-
// The draggable node is the cell content element
|
|
153
|
-
row = row
|
|
153
|
+
// The draggable node is the cell content element
|
|
154
|
+
row = getClosestCell(row)?.__parentRow;
|
|
154
155
|
}
|
|
155
|
-
if (row.parentNode !== this.$.items) {
|
|
156
|
+
if (!row || row.parentNode !== this.$.items) {
|
|
156
157
|
return;
|
|
157
158
|
}
|
|
158
159
|
|
|
@@ -8,15 +8,14 @@ import { Debouncer } from '@vaadin/component-base/src/debounce.js';
|
|
|
8
8
|
import { getClosestElement } from '@vaadin/component-base/src/dom-utils.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* Returns the grid cell that contains the given node,
|
|
12
|
-
* node is not inside a cell's content.
|
|
11
|
+
* Returns the grid cell that contains the given node, if any.
|
|
13
12
|
*
|
|
14
13
|
* @param {Node} node
|
|
15
|
-
* @return {HTMLElement | undefined}
|
|
14
|
+
* @return {HTMLElement | null | undefined}
|
|
16
15
|
*/
|
|
17
16
|
export function getClosestCell(node) {
|
|
18
17
|
const content = getClosestElement('vaadin-grid-cell-content', node);
|
|
19
|
-
return content?.assignedSlot?.
|
|
18
|
+
return content?.assignedSlot?.closest('.cell');
|
|
20
19
|
}
|
|
21
20
|
|
|
22
21
|
/**
|
package/src/vaadin-grid-mixin.js
CHANGED
|
@@ -332,13 +332,13 @@ export const GridMixin = (superClass) =>
|
|
|
332
332
|
for (let i = 0; i < count; i++) {
|
|
333
333
|
const row = this.__createBodyRow();
|
|
334
334
|
if (this._columnTree) {
|
|
335
|
-
this.__initRow(row, this._columnTree
|
|
335
|
+
this.__initRow(row, this._columnTree.at(-1), 'body', true);
|
|
336
336
|
}
|
|
337
337
|
rows.push(row);
|
|
338
338
|
}
|
|
339
339
|
|
|
340
340
|
if (this._columnTree) {
|
|
341
|
-
this._columnTree
|
|
341
|
+
this._columnTree.at(-1).forEach((c) => {
|
|
342
342
|
if (c.isConnected && c._cells) {
|
|
343
343
|
c._cells = [...c._cells];
|
|
344
344
|
}
|
|
@@ -565,15 +565,19 @@ export const GridMixin = (superClass) =>
|
|
|
565
565
|
* @protected
|
|
566
566
|
*/
|
|
567
567
|
_renderColumnTree(columnTree) {
|
|
568
|
+
// This render uses the current hidden state of all columns,
|
|
569
|
+
// so a pending render from a hidden change is not needed
|
|
570
|
+
this._debouncerHiddenChanged?.cancel();
|
|
571
|
+
|
|
568
572
|
iterateChildren(this.$.items, (row) => {
|
|
569
|
-
this.__initRow(row, columnTree
|
|
573
|
+
this.__initRow(row, columnTree.at(-1), 'body', true);
|
|
570
574
|
this.__updateRow(row);
|
|
571
575
|
});
|
|
572
576
|
|
|
573
577
|
this.__renderHeaderFooter();
|
|
574
578
|
|
|
575
579
|
// Sizer rows
|
|
576
|
-
this.__initRow(this.$.sizer, columnTree
|
|
580
|
+
this.__initRow(this.$.sizer, columnTree.at(-1));
|
|
577
581
|
|
|
578
582
|
this.__updateHorizontalScrollPosition();
|
|
579
583
|
this.__a11yUpdateHeaderRows();
|
|
@@ -87,7 +87,7 @@ export const RowDetailsMixin = (superClass) =>
|
|
|
87
87
|
// Only update the rows if the column tree has already been initialized
|
|
88
88
|
this._getRenderedRows().forEach((row) => {
|
|
89
89
|
if (!row.querySelector('.details-cell')) {
|
|
90
|
-
this.__initRow(row, this._columnTree
|
|
90
|
+
this.__initRow(row, this._columnTree.at(-1));
|
|
91
91
|
this.__updateRow(row);
|
|
92
92
|
return;
|
|
93
93
|
}
|
|
@@ -134,6 +134,24 @@ export const ScrollMixin = (superClass) =>
|
|
|
134
134
|
this.addController(this.__overflowController);
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
+
/** @protected */
|
|
138
|
+
updated(props) {
|
|
139
|
+
super.updated(props);
|
|
140
|
+
|
|
141
|
+
if (props.has('dir')) {
|
|
142
|
+
// Transforms calculated for the previous direction can push the
|
|
143
|
+
// containers and the frozen-to-end cells outside the table and increase
|
|
144
|
+
// its scroll width, so reset them before calculating the new position.
|
|
145
|
+
[this.$.header, this.$.items, this.$.footer, ...this._frozenToEndCells].forEach((element) => {
|
|
146
|
+
element.style.transform = '';
|
|
147
|
+
});
|
|
148
|
+
// The columns in the viewport and their offset with lazy column
|
|
149
|
+
// rendering depend on the direction as well
|
|
150
|
+
this.__updateColumnsBodyContentHidden();
|
|
151
|
+
this.__updateHorizontalScrollPosition();
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
137
155
|
/**
|
|
138
156
|
* Scroll to a specific row index in the virtual list. Note that the row index is
|
|
139
157
|
* not always the same for any particular item. For example, sorting or filtering
|
|
@@ -429,7 +447,7 @@ export const ScrollMixin = (superClass) =>
|
|
|
429
447
|
return;
|
|
430
448
|
}
|
|
431
449
|
|
|
432
|
-
const columnsRow = this._columnTree
|
|
450
|
+
const columnsRow = this._columnTree.at(-1).slice(0);
|
|
433
451
|
columnsRow.sort((a, b) => {
|
|
434
452
|
return a._order - b._order;
|
|
435
453
|
});
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { addListener, setTouchAction } from '@vaadin/component-base/src/gestures.js';
|
|
7
|
+
import { getClosestCell } from './vaadin-grid-helpers.js';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* A mixin that provides basic functionality for the
|
|
@@ -225,7 +226,7 @@ export const GridSelectionColumnBaseMixin = (superClass) =>
|
|
|
225
226
|
// the row have run in the current task, as the selection column may
|
|
226
227
|
// render before the row header column.
|
|
227
228
|
queueMicrotask(() => {
|
|
228
|
-
const row = root
|
|
229
|
+
const row = getClosestCell(root)?.__parentRow;
|
|
229
230
|
if (!checkbox.isConnected || !row) {
|
|
230
231
|
return;
|
|
231
232
|
}
|
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.4.0-
|
|
4
|
+
"version": "25.4.0-alpha5",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -71,7 +71,8 @@
|
|
|
71
71
|
"type": [
|
|
72
72
|
"boolean"
|
|
73
73
|
]
|
|
74
|
-
}
|
|
74
|
+
},
|
|
75
|
+
"default": "false"
|
|
75
76
|
},
|
|
76
77
|
{
|
|
77
78
|
"name": "row-header",
|
|
@@ -177,7 +178,8 @@
|
|
|
177
178
|
"type": [
|
|
178
179
|
"boolean"
|
|
179
180
|
]
|
|
180
|
-
}
|
|
181
|
+
},
|
|
182
|
+
"default": "false"
|
|
181
183
|
},
|
|
182
184
|
{
|
|
183
185
|
"name": "rowHeader",
|
|
@@ -203,7 +205,7 @@
|
|
|
203
205
|
},
|
|
204
206
|
{
|
|
205
207
|
"name": "vaadin-grid-column",
|
|
206
|
-
"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.4.0-
|
|
208
|
+
"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.4.0-alpha5/#/elements/vaadin-grid) documentation for instructions on how\nto configure the `<vaadin-grid-column>`.",
|
|
207
209
|
"attributes": [
|
|
208
210
|
{
|
|
209
211
|
"name": "auto-width",
|
|
@@ -293,7 +295,8 @@
|
|
|
293
295
|
"type": [
|
|
294
296
|
"boolean"
|
|
295
297
|
]
|
|
296
|
-
}
|
|
298
|
+
},
|
|
299
|
+
"default": "false"
|
|
297
300
|
},
|
|
298
301
|
{
|
|
299
302
|
"name": "row-header",
|
|
@@ -315,7 +318,7 @@
|
|
|
315
318
|
},
|
|
316
319
|
{
|
|
317
320
|
"name": "width",
|
|
318
|
-
"description": "Width of the cells for this column.\n\nPlease note that using the `em` length unit is discouraged as\nit might lead to misalignment issues if the header, body, and footer\ncells have different font sizes. Instead, use `rem` if you need\na length unit relative to the font size.",
|
|
321
|
+
"description": "Width of the cells for this column.\nSetting the property to `null` or `undefined` restores the default width.\n\nPlease note that using the `em` length unit is discouraged as\nit might lead to misalignment issues if the header, body, and footer\ncells have different font sizes. Instead, use `rem` if you need\na length unit relative to the font size.",
|
|
319
322
|
"value": {
|
|
320
323
|
"type": [
|
|
321
324
|
"string"
|
|
@@ -446,7 +449,8 @@
|
|
|
446
449
|
"type": [
|
|
447
450
|
"boolean"
|
|
448
451
|
]
|
|
449
|
-
}
|
|
452
|
+
},
|
|
453
|
+
"default": "false"
|
|
450
454
|
},
|
|
451
455
|
{
|
|
452
456
|
"name": "rowHeader",
|
|
@@ -468,7 +472,7 @@
|
|
|
468
472
|
},
|
|
469
473
|
{
|
|
470
474
|
"name": "width",
|
|
471
|
-
"description": "Width of the cells for this column.\n\nPlease note that using the `em` length unit is discouraged as\nit might lead to misalignment issues if the header, body, and footer\ncells have different font sizes. Instead, use `rem` if you need\na length unit relative to the font size.",
|
|
475
|
+
"description": "Width of the cells for this column.\nSetting the property to `null` or `undefined` restores the default width.\n\nPlease note that using the `em` length unit is discouraged as\nit might lead to misalignment issues if the header, body, and footer\ncells have different font sizes. Instead, use `rem` if you need\na length unit relative to the font size.",
|
|
472
476
|
"value": {
|
|
473
477
|
"type": [
|
|
474
478
|
"string"
|
|
@@ -571,7 +575,8 @@
|
|
|
571
575
|
"type": [
|
|
572
576
|
"boolean"
|
|
573
577
|
]
|
|
574
|
-
}
|
|
578
|
+
},
|
|
579
|
+
"default": "false"
|
|
575
580
|
},
|
|
576
581
|
{
|
|
577
582
|
"name": "row-header",
|
|
@@ -593,7 +598,7 @@
|
|
|
593
598
|
},
|
|
594
599
|
{
|
|
595
600
|
"name": "width",
|
|
596
|
-
"description": "Width of the cells for this column.\n\nPlease note that using the `em` length unit is discouraged as\nit might lead to misalignment issues if the header, body, and footer\ncells have different font sizes. Instead, use `rem` if you need\na length unit relative to the font size.",
|
|
601
|
+
"description": "Width of the cells for this column.\nSetting the property to `null` or `undefined` restores the default width.\n\nPlease note that using the `em` length unit is discouraged as\nit might lead to misalignment issues if the header, body, and footer\ncells have different font sizes. Instead, use `rem` if you need\na length unit relative to the font size.",
|
|
597
602
|
"value": {
|
|
598
603
|
"type": [
|
|
599
604
|
"string"
|
|
@@ -724,7 +729,8 @@
|
|
|
724
729
|
"type": [
|
|
725
730
|
"boolean"
|
|
726
731
|
]
|
|
727
|
-
}
|
|
732
|
+
},
|
|
733
|
+
"default": "false"
|
|
728
734
|
},
|
|
729
735
|
{
|
|
730
736
|
"name": "rowHeader",
|
|
@@ -746,7 +752,7 @@
|
|
|
746
752
|
},
|
|
747
753
|
{
|
|
748
754
|
"name": "width",
|
|
749
|
-
"description": "Width of the cells for this column.\n\nPlease note that using the `em` length unit is discouraged as\nit might lead to misalignment issues if the header, body, and footer\ncells have different font sizes. Instead, use `rem` if you need\na length unit relative to the font size.",
|
|
755
|
+
"description": "Width of the cells for this column.\nSetting the property to `null` or `undefined` restores the default width.\n\nPlease note that using the `em` length unit is discouraged as\nit might lead to misalignment issues if the header, body, and footer\ncells have different font sizes. Instead, use `rem` if you need\na length unit relative to the font size.",
|
|
750
756
|
"value": {
|
|
751
757
|
"type": [
|
|
752
758
|
"string"
|
|
@@ -820,7 +826,7 @@
|
|
|
820
826
|
},
|
|
821
827
|
{
|
|
822
828
|
"name": "vaadin-grid-selection-column",
|
|
823
|
-
"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.4.0-
|
|
829
|
+
"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.4.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__",
|
|
824
830
|
"attributes": [
|
|
825
831
|
{
|
|
826
832
|
"name": "auto-select",
|
|
@@ -928,7 +934,8 @@
|
|
|
928
934
|
"type": [
|
|
929
935
|
"boolean"
|
|
930
936
|
]
|
|
931
|
-
}
|
|
937
|
+
},
|
|
938
|
+
"default": "false"
|
|
932
939
|
},
|
|
933
940
|
{
|
|
934
941
|
"name": "row-header",
|
|
@@ -1108,7 +1115,8 @@
|
|
|
1108
1115
|
"type": [
|
|
1109
1116
|
"boolean"
|
|
1110
1117
|
]
|
|
1111
|
-
}
|
|
1118
|
+
},
|
|
1119
|
+
"default": "false"
|
|
1112
1120
|
},
|
|
1113
1121
|
{
|
|
1114
1122
|
"name": "rowHeader",
|
|
@@ -1256,7 +1264,8 @@
|
|
|
1256
1264
|
"type": [
|
|
1257
1265
|
"boolean"
|
|
1258
1266
|
]
|
|
1259
|
-
}
|
|
1267
|
+
},
|
|
1268
|
+
"default": "false"
|
|
1260
1269
|
},
|
|
1261
1270
|
{
|
|
1262
1271
|
"name": "row-header",
|
|
@@ -1278,7 +1287,7 @@
|
|
|
1278
1287
|
},
|
|
1279
1288
|
{
|
|
1280
1289
|
"name": "width",
|
|
1281
|
-
"description": "Width of the cells for this column.\n\nPlease note that using the `em` length unit is discouraged as\nit might lead to misalignment issues if the header, body, and footer\ncells have different font sizes. Instead, use `rem` if you need\na length unit relative to the font size.",
|
|
1290
|
+
"description": "Width of the cells for this column.\nSetting the property to `null` or `undefined` restores the default width.\n\nPlease note that using the `em` length unit is discouraged as\nit might lead to misalignment issues if the header, body, and footer\ncells have different font sizes. Instead, use `rem` if you need\na length unit relative to the font size.",
|
|
1282
1291
|
"value": {
|
|
1283
1292
|
"type": [
|
|
1284
1293
|
"string"
|
|
@@ -1418,7 +1427,8 @@
|
|
|
1418
1427
|
"type": [
|
|
1419
1428
|
"boolean"
|
|
1420
1429
|
]
|
|
1421
|
-
}
|
|
1430
|
+
},
|
|
1431
|
+
"default": "false"
|
|
1422
1432
|
},
|
|
1423
1433
|
{
|
|
1424
1434
|
"name": "rowHeader",
|
|
@@ -1440,7 +1450,7 @@
|
|
|
1440
1450
|
},
|
|
1441
1451
|
{
|
|
1442
1452
|
"name": "width",
|
|
1443
|
-
"description": "Width of the cells for this column.\n\nPlease note that using the `em` length unit is discouraged as\nit might lead to misalignment issues if the header, body, and footer\ncells have different font sizes. Instead, use `rem` if you need\na length unit relative to the font size.",
|
|
1453
|
+
"description": "Width of the cells for this column.\nSetting the property to `null` or `undefined` restores the default width.\n\nPlease note that using the `em` length unit is discouraged as\nit might lead to misalignment issues if the header, body, and footer\ncells have different font sizes. Instead, use `rem` if you need\na length unit relative to the font size.",
|
|
1444
1454
|
"value": {
|
|
1445
1455
|
"type": [
|
|
1446
1456
|
"string"
|
|
@@ -1613,7 +1623,8 @@
|
|
|
1613
1623
|
"type": [
|
|
1614
1624
|
"boolean"
|
|
1615
1625
|
]
|
|
1616
|
-
}
|
|
1626
|
+
},
|
|
1627
|
+
"default": "false"
|
|
1617
1628
|
},
|
|
1618
1629
|
{
|
|
1619
1630
|
"name": "row-header",
|
|
@@ -1635,7 +1646,7 @@
|
|
|
1635
1646
|
},
|
|
1636
1647
|
{
|
|
1637
1648
|
"name": "width",
|
|
1638
|
-
"description": "Width of the cells for this column.\n\nPlease note that using the `em` length unit is discouraged as\nit might lead to misalignment issues if the header, body, and footer\ncells have different font sizes. Instead, use `rem` if you need\na length unit relative to the font size.",
|
|
1649
|
+
"description": "Width of the cells for this column.\nSetting the property to `null` or `undefined` restores the default width.\n\nPlease note that using the `em` length unit is discouraged as\nit might lead to misalignment issues if the header, body, and footer\ncells have different font sizes. Instead, use `rem` if you need\na length unit relative to the font size.",
|
|
1639
1650
|
"value": {
|
|
1640
1651
|
"type": [
|
|
1641
1652
|
"string"
|
|
@@ -1766,7 +1777,8 @@
|
|
|
1766
1777
|
"type": [
|
|
1767
1778
|
"boolean"
|
|
1768
1779
|
]
|
|
1769
|
-
}
|
|
1780
|
+
},
|
|
1781
|
+
"default": "false"
|
|
1770
1782
|
},
|
|
1771
1783
|
{
|
|
1772
1784
|
"name": "rowHeader",
|
|
@@ -1788,7 +1800,7 @@
|
|
|
1788
1800
|
},
|
|
1789
1801
|
{
|
|
1790
1802
|
"name": "width",
|
|
1791
|
-
"description": "Width of the cells for this column.\n\nPlease note that using the `em` length unit is discouraged as\nit might lead to misalignment issues if the header, body, and footer\ncells have different font sizes. Instead, use `rem` if you need\na length unit relative to the font size.",
|
|
1803
|
+
"description": "Width of the cells for this column.\nSetting the property to `null` or `undefined` restores the default width.\n\nPlease note that using the `em` length unit is discouraged as\nit might lead to misalignment issues if the header, body, and footer\ncells have different font sizes. Instead, use `rem` if you need\na length unit relative to the font size.",
|
|
1792
1804
|
"value": {
|
|
1793
1805
|
"type": [
|
|
1794
1806
|
"string"
|
|
@@ -1880,7 +1892,7 @@
|
|
|
1880
1892
|
},
|
|
1881
1893
|
{
|
|
1882
1894
|
"name": "vaadin-grid",
|
|
1883
|
-
"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.4.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/25.4.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`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.4.0-alpha3/#/elements/vaadin-grid-column-group)\n- [`<vaadin-grid-filter>`](https://cdn.vaadin.com/vaadin-web-components/25.4.0-alpha3/#/elements/vaadin-grid-filter)\n- [`<vaadin-grid-sorter>`](https://cdn.vaadin.com/vaadin-web-components/25.4.0-alpha3/#/elements/vaadin-grid-sorter)\n- [`<vaadin-grid-selection-column>`](https://cdn.vaadin.com/vaadin-web-components/25.4.0-alpha3/#/elements/vaadin-grid-selection-column)\n- [`<vaadin-grid-tree-toggle>`](https://cdn.vaadin.com/vaadin-web-components/25.4.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.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.4.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/25.4.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`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\nThe following custom CSS properties are available for styling:\n\nCustom CSS property |\n:--------------------------------------------------|\n| `--vaadin-grid-background` |\n| `--vaadin-grid-border-color` |\n| `--vaadin-grid-border-radius` |\n| `--vaadin-grid-border-width` |\n| `--vaadin-grid-cell-background-color` |\n| `--vaadin-grid-cell-padding` |\n| `--vaadin-grid-cell-text-overflow` |\n| `--vaadin-grid-column-border-width` |\n| `--vaadin-grid-column-resize-handle-color` |\n| `--vaadin-grid-header-font-size` |\n| `--vaadin-grid-header-font-weight` |\n| `--vaadin-grid-header-text-color` |\n| `--vaadin-grid-row-background-color` |\n| `--vaadin-grid-row-border-width` |\n| `--vaadin-grid-row-highlight-background-color` |\n| `--vaadin-grid-row-hover-background-color` |\n| `--vaadin-grid-row-odd-background-color` |\n| `--vaadin-grid-row-selected-background-color` |\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
1895
|
+
"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.4.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/25.4.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`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.4.0-alpha5/#/elements/vaadin-grid-column-group)\n- [`<vaadin-grid-filter>`](https://cdn.vaadin.com/vaadin-web-components/25.4.0-alpha5/#/elements/vaadin-grid-filter)\n- [`<vaadin-grid-sorter>`](https://cdn.vaadin.com/vaadin-web-components/25.4.0-alpha5/#/elements/vaadin-grid-sorter)\n- [`<vaadin-grid-selection-column>`](https://cdn.vaadin.com/vaadin-web-components/25.4.0-alpha5/#/elements/vaadin-grid-selection-column)\n- [`<vaadin-grid-tree-toggle>`](https://cdn.vaadin.com/vaadin-web-components/25.4.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.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.4.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/25.4.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`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\nThe following custom CSS properties are available for styling:\n\nCustom CSS property |\n:--------------------------------------------------|\n| `--vaadin-grid-background` |\n| `--vaadin-grid-border-color` |\n| `--vaadin-grid-border-radius` |\n| `--vaadin-grid-border-width` |\n| `--vaadin-grid-cell-background-color` |\n| `--vaadin-grid-cell-padding` |\n| `--vaadin-grid-cell-text-overflow` |\n| `--vaadin-grid-column-border-width` |\n| `--vaadin-grid-column-resize-handle-color` |\n| `--vaadin-grid-header-font-size` |\n| `--vaadin-grid-header-font-weight` |\n| `--vaadin-grid-header-text-color` |\n| `--vaadin-grid-row-background-color` |\n| `--vaadin-grid-row-border-width` |\n| `--vaadin-grid-row-highlight-background-color` |\n| `--vaadin-grid-row-hover-background-color` |\n| `--vaadin-grid-row-odd-background-color` |\n| `--vaadin-grid-row-selected-background-color` |\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
1884
1896
|
"attributes": [
|
|
1885
1897
|
{
|
|
1886
1898
|
"name": "accessible-name",
|
|
@@ -2150,7 +2162,7 @@
|
|
|
2150
2162
|
"description": "The object used to localize this component. To change the default\nlocalization, set this to an object that provides all properties, or\njust the individual properties you want to change.\n\nWhen not set, defaults to `undefined`.\n\nThe object has the following JSON structure and default values:\n\n```js\n{\n // Accessible name (aria-label) for the select all checkbox in the\n // selection column header cell.\n selectAll: 'Select All',\n // Screen-reader-only label announced for the selection column header cell\n // when the Select All checkbox is hidden (data provider or conditional selection).\n selectAllUnavailable: 'Select All unavailable',\n // Accessible name (aria-label) for the select row checkbox in each\n // selection column body cell. The `{rowHeader}` placeholder is replaced with the\n // row header cell text content or row index if there is no row header column.\n selectRow: 'Select Row {rowHeader}',\n // Accessible name (aria-label) for the grid sorters. The `{column}`\n // placeholder is replaced with the sorter text content.\n sorter: 'Sort by {column}',\n}\n```",
|
|
2151
2163
|
"value": {
|
|
2152
2164
|
"type": [
|
|
2153
|
-
"
|
|
2165
|
+
"GridI18n",
|
|
2154
2166
|
"undefined"
|
|
2155
2167
|
]
|
|
2156
2168
|
}
|