@vaadin/grid 23.1.0-alpha2 → 23.1.0-beta1
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 +10 -10
- package/src/vaadin-grid-a11y-mixin.js +5 -5
- package/src/vaadin-grid-active-item-mixin.d.ts +1 -1
- package/src/vaadin-grid-active-item-mixin.js +8 -8
- package/src/vaadin-grid-array-data-provider-mixin.d.ts +1 -1
- package/src/vaadin-grid-array-data-provider-mixin.js +4 -4
- package/src/vaadin-grid-column-group.js +22 -21
- package/src/vaadin-grid-column-reordering-mixin.d.ts +1 -1
- package/src/vaadin-grid-column-reordering-mixin.js +10 -10
- package/src/vaadin-grid-column-resizing-mixin.js +12 -18
- package/src/vaadin-grid-column.d.ts +2 -2
- package/src/vaadin-grid-column.js +38 -27
- package/src/vaadin-grid-data-provider-mixin.d.ts +2 -2
- package/src/vaadin-grid-data-provider-mixin.js +15 -15
- package/src/vaadin-grid-drag-and-drop-mixin.d.ts +1 -1
- package/src/vaadin-grid-drag-and-drop-mixin.js +9 -9
- package/src/vaadin-grid-dynamic-columns-mixin.js +23 -24
- package/src/vaadin-grid-event-context-mixin.d.ts +1 -1
- package/src/vaadin-grid-event-context-mixin.js +1 -1
- package/src/vaadin-grid-filter-column.js +1 -1
- package/src/vaadin-grid-filter-mixin.js +4 -4
- package/src/vaadin-grid-filter.d.ts +2 -2
- package/src/vaadin-grid-filter.js +2 -2
- package/src/vaadin-grid-keyboard-navigation-mixin.js +15 -15
- package/src/vaadin-grid-row-details-mixin.d.ts +2 -2
- package/src/vaadin-grid-row-details-mixin.js +4 -4
- package/src/vaadin-grid-scroll-mixin.js +7 -7
- package/src/vaadin-grid-selection-column.d.ts +2 -2
- package/src/vaadin-grid-selection-column.js +7 -7
- package/src/vaadin-grid-selection-mixin.d.ts +1 -1
- package/src/vaadin-grid-selection-mixin.js +2 -2
- package/src/vaadin-grid-sort-column.d.ts +2 -2
- package/src/vaadin-grid-sort-column.js +2 -2
- package/src/vaadin-grid-sort-mixin.js +7 -7
- package/src/vaadin-grid-sorter.d.ts +2 -2
- package/src/vaadin-grid-sorter.js +4 -4
- package/src/vaadin-grid-styles.js +1 -1
- package/src/vaadin-grid-styling-mixin.d.ts +1 -1
- package/src/vaadin-grid-styling-mixin.js +1 -1
- package/src/vaadin-grid-tree-column.js +3 -3
- package/src/vaadin-grid-tree-toggle.d.ts +2 -2
- package/src/vaadin-grid-tree-toggle.js +4 -4
- package/src/vaadin-grid.d.ts +5 -5
- package/src/vaadin-grid.js +45 -41
- package/theme/lumo/vaadin-grid-sorter-styles.js +1 -1
- package/theme/lumo/vaadin-grid-styles.js +2 -2
- package/theme/lumo/vaadin-grid-tree-toggle-styles.js +1 -1
- package/theme/material/vaadin-grid-sorter-styles.js +1 -1
- package/theme/material/vaadin-grid-styles.js +1 -1
- package/theme/material/vaadin-grid-tree-toggle-styles.js +1 -1
|
@@ -49,13 +49,13 @@ declare class GridSortColumn<TItem = GridDefaultItem> extends GridColumn<TItem>
|
|
|
49
49
|
addEventListener<K extends keyof GridSortColumnEventMap>(
|
|
50
50
|
type: K,
|
|
51
51
|
listener: (this: GridSortColumn<TItem>, ev: GridSortColumnEventMap[K]) => void,
|
|
52
|
-
options?: boolean | AddEventListenerOptions
|
|
52
|
+
options?: boolean | AddEventListenerOptions,
|
|
53
53
|
): void;
|
|
54
54
|
|
|
55
55
|
removeEventListener<K extends keyof GridSortColumnEventMap>(
|
|
56
56
|
type: K,
|
|
57
57
|
listener: (this: GridSortColumn<TItem>, ev: GridSortColumnEventMap[K]) => void,
|
|
58
|
-
options?: boolean | EventListenerOptions
|
|
58
|
+
options?: boolean | EventListenerOptions,
|
|
59
59
|
): void;
|
|
60
60
|
}
|
|
61
61
|
|
|
@@ -18,7 +18,7 @@ export const SortMixin = (superClass) =>
|
|
|
18
18
|
*/
|
|
19
19
|
multiSort: {
|
|
20
20
|
type: Boolean,
|
|
21
|
-
value: false
|
|
21
|
+
value: false,
|
|
22
22
|
},
|
|
23
23
|
|
|
24
24
|
/**
|
|
@@ -29,7 +29,7 @@ export const SortMixin = (superClass) =>
|
|
|
29
29
|
type: Array,
|
|
30
30
|
value: function () {
|
|
31
31
|
return [];
|
|
32
|
-
}
|
|
32
|
+
},
|
|
33
33
|
},
|
|
34
34
|
|
|
35
35
|
/** @private */
|
|
@@ -37,8 +37,8 @@ export const SortMixin = (superClass) =>
|
|
|
37
37
|
type: Array,
|
|
38
38
|
value: function () {
|
|
39
39
|
return [];
|
|
40
|
-
}
|
|
41
|
-
}
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
|
|
@@ -58,7 +58,7 @@ export const SortMixin = (superClass) =>
|
|
|
58
58
|
|
|
59
59
|
/** @private */
|
|
60
60
|
__removeSorters(sortersToRemove) {
|
|
61
|
-
if (sortersToRemove.length
|
|
61
|
+
if (sortersToRemove.length === 0) {
|
|
62
62
|
return;
|
|
63
63
|
}
|
|
64
64
|
|
|
@@ -89,7 +89,7 @@ export const SortMixin = (superClass) =>
|
|
|
89
89
|
}
|
|
90
90
|
this.__updateSortOrders();
|
|
91
91
|
} else if (sorter.direction) {
|
|
92
|
-
const otherSorters = this._sorters.filter((s) => s
|
|
92
|
+
const otherSorters = this._sorters.filter((s) => s !== sorter);
|
|
93
93
|
this._sorters = [sorter];
|
|
94
94
|
otherSorters.forEach((sorter) => {
|
|
95
95
|
sorter._order = null;
|
|
@@ -122,7 +122,7 @@ export const SortMixin = (superClass) =>
|
|
|
122
122
|
return this._sorters.map((sorter) => {
|
|
123
123
|
return {
|
|
124
124
|
path: sorter.path,
|
|
125
|
-
direction: sorter.direction
|
|
125
|
+
direction: sorter.direction,
|
|
126
126
|
};
|
|
127
127
|
});
|
|
128
128
|
}
|
|
@@ -76,13 +76,13 @@ declare class GridSorter extends ThemableMixin(DirMixin(HTMLElement)) {
|
|
|
76
76
|
addEventListener<K extends keyof GridSorterEventMap>(
|
|
77
77
|
type: K,
|
|
78
78
|
listener: (this: GridSorter, ev: GridSorterEventMap[K]) => void,
|
|
79
|
-
options?: boolean | AddEventListenerOptions
|
|
79
|
+
options?: boolean | AddEventListenerOptions,
|
|
80
80
|
): void;
|
|
81
81
|
|
|
82
82
|
removeEventListener<K extends keyof GridSorterEventMap>(
|
|
83
83
|
type: K,
|
|
84
84
|
listener: (this: GridSorter, ev: GridSorterEventMap[K]) => void,
|
|
85
|
-
options?: boolean | EventListenerOptions
|
|
85
|
+
options?: boolean | EventListenerOptions,
|
|
86
86
|
): void;
|
|
87
87
|
}
|
|
88
88
|
|
|
@@ -136,7 +136,7 @@ class GridSorter extends ThemableMixin(DirMixin(PolymerElement)) {
|
|
|
136
136
|
type: String,
|
|
137
137
|
reflectToAttribute: true,
|
|
138
138
|
notify: true,
|
|
139
|
-
value: null
|
|
139
|
+
value: null,
|
|
140
140
|
},
|
|
141
141
|
|
|
142
142
|
/**
|
|
@@ -145,14 +145,14 @@ class GridSorter extends ThemableMixin(DirMixin(PolymerElement)) {
|
|
|
145
145
|
*/
|
|
146
146
|
_order: {
|
|
147
147
|
type: Number,
|
|
148
|
-
value: null
|
|
148
|
+
value: null,
|
|
149
149
|
},
|
|
150
150
|
|
|
151
151
|
/** @private */
|
|
152
152
|
_isConnected: {
|
|
153
153
|
type: Boolean,
|
|
154
|
-
observer: '__isConnectedChanged'
|
|
155
|
-
}
|
|
154
|
+
observer: '__isConnectedChanged',
|
|
155
|
+
},
|
|
156
156
|
};
|
|
157
157
|
}
|
|
158
158
|
|
|
@@ -10,7 +10,7 @@ import { GridColumn } from './vaadin-grid-column.js';
|
|
|
10
10
|
export type GridCellClassNameGenerator<TItem> = (column: GridColumn<TItem>, model: GridItemModel<TItem>) => string;
|
|
11
11
|
|
|
12
12
|
export declare function StylingMixin<TItem, T extends Constructor<HTMLElement>>(
|
|
13
|
-
base: T
|
|
13
|
+
base: T,
|
|
14
14
|
): T & Constructor<StylingMixinClass<TItem>>;
|
|
15
15
|
|
|
16
16
|
export declare class StylingMixinClass<TItem> {
|
|
@@ -38,8 +38,8 @@ class GridTreeColumn extends GridColumn {
|
|
|
38
38
|
*/
|
|
39
39
|
itemHasChildrenPath: {
|
|
40
40
|
type: String,
|
|
41
|
-
observer: '_itemHasChildrenPathChanged'
|
|
42
|
-
}
|
|
41
|
+
observer: '_itemHasChildrenPathChanged',
|
|
42
|
+
},
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
45
|
|
|
@@ -89,7 +89,7 @@ class GridTreeColumn extends GridColumn {
|
|
|
89
89
|
_itemHasChildrenPathChanged(itemHasChildrenPath) {
|
|
90
90
|
if (itemHasChildrenPath) {
|
|
91
91
|
console.warn(
|
|
92
|
-
`WARNING: Since Vaadin 23, itemHasChildrenPath on <vaadin-grid-tree-column> is deprecated. Please set this property on the <vaadin-grid> instead
|
|
92
|
+
`WARNING: Since Vaadin 23, itemHasChildrenPath on <vaadin-grid-tree-column> is deprecated. Please set this property on the <vaadin-grid> instead.`,
|
|
93
93
|
);
|
|
94
94
|
|
|
95
95
|
if (this._grid) {
|
|
@@ -85,13 +85,13 @@ declare class GridTreeToggle extends ThemableMixin(DirMixin(HTMLElement)) {
|
|
|
85
85
|
addEventListener<K extends keyof GridTreeToggleEventMap>(
|
|
86
86
|
type: K,
|
|
87
87
|
listener: (this: GridTreeToggle, ev: GridTreeToggleEventMap[K]) => void,
|
|
88
|
-
options?: boolean | AddEventListenerOptions
|
|
88
|
+
options?: boolean | AddEventListenerOptions,
|
|
89
89
|
): void;
|
|
90
90
|
|
|
91
91
|
removeEventListener<K extends keyof GridTreeToggleEventMap>(
|
|
92
92
|
type: K,
|
|
93
93
|
listener: (this: GridTreeToggle, ev: GridTreeToggleEventMap[K]) => void,
|
|
94
|
-
options?: boolean | EventListenerOptions
|
|
94
|
+
options?: boolean | EventListenerOptions,
|
|
95
95
|
): void;
|
|
96
96
|
}
|
|
97
97
|
|
|
@@ -154,7 +154,7 @@ class GridTreeToggle extends ThemableMixin(DirMixin(PolymerElement)) {
|
|
|
154
154
|
level: {
|
|
155
155
|
type: Number,
|
|
156
156
|
value: 0,
|
|
157
|
-
observer: '_levelChanged'
|
|
157
|
+
observer: '_levelChanged',
|
|
158
158
|
},
|
|
159
159
|
|
|
160
160
|
/**
|
|
@@ -164,7 +164,7 @@ class GridTreeToggle extends ThemableMixin(DirMixin(PolymerElement)) {
|
|
|
164
164
|
leaf: {
|
|
165
165
|
type: Boolean,
|
|
166
166
|
value: false,
|
|
167
|
-
reflectToAttribute: true
|
|
167
|
+
reflectToAttribute: true,
|
|
168
168
|
},
|
|
169
169
|
|
|
170
170
|
/**
|
|
@@ -175,8 +175,8 @@ class GridTreeToggle extends ThemableMixin(DirMixin(PolymerElement)) {
|
|
|
175
175
|
type: Boolean,
|
|
176
176
|
value: false,
|
|
177
177
|
reflectToAttribute: true,
|
|
178
|
-
notify: true
|
|
179
|
-
}
|
|
178
|
+
notify: true,
|
|
179
|
+
},
|
|
180
180
|
};
|
|
181
181
|
}
|
|
182
182
|
|
package/src/vaadin-grid.d.ts
CHANGED
|
@@ -17,13 +17,13 @@ import {
|
|
|
17
17
|
GridDataProviderParams,
|
|
18
18
|
GridFilterDefinition,
|
|
19
19
|
GridSorterDefinition,
|
|
20
|
-
GridSorterDirection
|
|
20
|
+
GridSorterDirection,
|
|
21
21
|
} from './vaadin-grid-data-provider-mixin.js';
|
|
22
22
|
import {
|
|
23
23
|
DragAndDropMixinClass,
|
|
24
24
|
GridDragAndDropFilter,
|
|
25
25
|
GridDropLocation,
|
|
26
|
-
GridDropMode
|
|
26
|
+
GridDropMode,
|
|
27
27
|
} from './vaadin-grid-drag-and-drop-mixin.js';
|
|
28
28
|
import { EventContextMixinClass, GridEventContext } from './vaadin-grid-event-context-mixin.js';
|
|
29
29
|
import { GridRowDetailsRenderer, RowDetailsMixinClass } from './vaadin-grid-row-details-mixin.js';
|
|
@@ -46,7 +46,7 @@ export {
|
|
|
46
46
|
GridHeaderFooterRenderer,
|
|
47
47
|
GridRowDetailsRenderer,
|
|
48
48
|
GridSorterDefinition,
|
|
49
|
-
GridSorterDirection
|
|
49
|
+
GridSorterDirection,
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
export type GridDefaultItem = any;
|
|
@@ -379,13 +379,13 @@ declare class Grid<TItem = GridDefaultItem> extends HTMLElement {
|
|
|
379
379
|
addEventListener<K extends keyof GridEventMap<TItem>>(
|
|
380
380
|
type: K,
|
|
381
381
|
listener: (this: Grid<TItem>, ev: GridEventMap<TItem>[K]) => void,
|
|
382
|
-
options?: boolean | AddEventListenerOptions
|
|
382
|
+
options?: boolean | AddEventListenerOptions,
|
|
383
383
|
): void;
|
|
384
384
|
|
|
385
385
|
removeEventListener<K extends keyof GridEventMap<TItem>>(
|
|
386
386
|
type: K,
|
|
387
387
|
listener: (this: Grid<TItem>, ev: GridEventMap<TItem>[K]) => void,
|
|
388
|
-
options?: boolean | EventListenerOptions
|
|
388
|
+
options?: boolean | EventListenerOptions,
|
|
389
389
|
): void;
|
|
390
390
|
}
|
|
391
391
|
|
package/src/vaadin-grid.js
CHANGED
|
@@ -258,21 +258,21 @@ class Grid extends ElementMixin(
|
|
|
258
258
|
FilterMixin(
|
|
259
259
|
ColumnReorderingMixin(
|
|
260
260
|
ColumnResizingMixin(
|
|
261
|
-
EventContextMixin(DragAndDropMixin(StylingMixin(TabindexMixin(PolymerElement))))
|
|
262
|
-
)
|
|
263
|
-
)
|
|
264
|
-
)
|
|
265
|
-
)
|
|
266
|
-
)
|
|
267
|
-
)
|
|
268
|
-
)
|
|
269
|
-
)
|
|
270
|
-
)
|
|
271
|
-
)
|
|
272
|
-
)
|
|
273
|
-
)
|
|
274
|
-
)
|
|
275
|
-
)
|
|
261
|
+
EventContextMixin(DragAndDropMixin(StylingMixin(TabindexMixin(PolymerElement)))),
|
|
262
|
+
),
|
|
263
|
+
),
|
|
264
|
+
),
|
|
265
|
+
),
|
|
266
|
+
),
|
|
267
|
+
),
|
|
268
|
+
),
|
|
269
|
+
),
|
|
270
|
+
),
|
|
271
|
+
),
|
|
272
|
+
),
|
|
273
|
+
),
|
|
274
|
+
),
|
|
275
|
+
),
|
|
276
276
|
) {
|
|
277
277
|
static get template() {
|
|
278
278
|
return html`
|
|
@@ -304,7 +304,7 @@ class Grid extends ElementMixin(
|
|
|
304
304
|
static get observers() {
|
|
305
305
|
return [
|
|
306
306
|
'_columnTreeChanged(_columnTree, _columnTree.*)',
|
|
307
|
-
'_effectiveSizeChanged(_effectiveSize, __virtualizer, _hasData, _columnTree)'
|
|
307
|
+
'_effectiveSizeChanged(_effectiveSize, __virtualizer, _hasData, _columnTree)',
|
|
308
308
|
];
|
|
309
309
|
}
|
|
310
310
|
|
|
@@ -313,31 +313,31 @@ class Grid extends ElementMixin(
|
|
|
313
313
|
/** @private */
|
|
314
314
|
_safari: {
|
|
315
315
|
type: Boolean,
|
|
316
|
-
value: isSafari
|
|
316
|
+
value: isSafari,
|
|
317
317
|
},
|
|
318
318
|
|
|
319
319
|
/** @private */
|
|
320
320
|
_ios: {
|
|
321
321
|
type: Boolean,
|
|
322
|
-
value: isIOS
|
|
322
|
+
value: isIOS,
|
|
323
323
|
},
|
|
324
324
|
|
|
325
325
|
/** @private */
|
|
326
326
|
_firefox: {
|
|
327
327
|
type: Boolean,
|
|
328
|
-
value: isFirefox
|
|
328
|
+
value: isFirefox,
|
|
329
329
|
},
|
|
330
330
|
|
|
331
331
|
/** @private */
|
|
332
332
|
_android: {
|
|
333
333
|
type: Boolean,
|
|
334
|
-
value: isAndroid
|
|
334
|
+
value: isAndroid,
|
|
335
335
|
},
|
|
336
336
|
|
|
337
337
|
/** @private */
|
|
338
338
|
_touchDevice: {
|
|
339
339
|
type: Boolean,
|
|
340
|
-
value: isTouch
|
|
340
|
+
value: isTouch,
|
|
341
341
|
},
|
|
342
342
|
|
|
343
343
|
/**
|
|
@@ -351,18 +351,18 @@ class Grid extends ElementMixin(
|
|
|
351
351
|
allRowsVisible: {
|
|
352
352
|
type: Boolean,
|
|
353
353
|
value: false,
|
|
354
|
-
reflectToAttribute: true
|
|
354
|
+
reflectToAttribute: true,
|
|
355
355
|
},
|
|
356
356
|
|
|
357
357
|
/** @private */
|
|
358
358
|
_recalculateColumnWidthOnceLoadingFinished: {
|
|
359
359
|
type: Boolean,
|
|
360
|
-
value: true
|
|
360
|
+
value: true,
|
|
361
361
|
},
|
|
362
362
|
|
|
363
363
|
/** @private */
|
|
364
364
|
isAttached: {
|
|
365
|
-
value: false
|
|
365
|
+
value: false,
|
|
366
366
|
},
|
|
367
367
|
|
|
368
368
|
/**
|
|
@@ -373,8 +373,8 @@ class Grid extends ElementMixin(
|
|
|
373
373
|
*/
|
|
374
374
|
__gridElement: {
|
|
375
375
|
type: Boolean,
|
|
376
|
-
value: true
|
|
377
|
-
}
|
|
376
|
+
value: true,
|
|
377
|
+
},
|
|
378
378
|
};
|
|
379
379
|
}
|
|
380
380
|
|
|
@@ -447,7 +447,7 @@ class Grid extends ElementMixin(
|
|
|
447
447
|
updateElement: this._updateScrollerItem.bind(this),
|
|
448
448
|
scrollContainer: this.$.items,
|
|
449
449
|
scrollTarget: this.$.table,
|
|
450
|
-
reorderElements: true
|
|
450
|
+
reorderElements: true,
|
|
451
451
|
});
|
|
452
452
|
|
|
453
453
|
new ResizeObserver(() => setTimeout(() => this.__updateFooterPositioning())).observe(this.$.footer);
|
|
@@ -473,7 +473,7 @@ class Grid extends ElementMixin(
|
|
|
473
473
|
if (this.$.items.contains(cell) && cell.localName === 'td') {
|
|
474
474
|
return {
|
|
475
475
|
item: cell.parentElement._item,
|
|
476
|
-
column: cell._column
|
|
476
|
+
column: cell._column,
|
|
477
477
|
};
|
|
478
478
|
}
|
|
479
479
|
}
|
|
@@ -482,7 +482,9 @@ class Grid extends ElementMixin(
|
|
|
482
482
|
__focusBodyCell({ item, column }) {
|
|
483
483
|
const row = this._getVisibleRows().find((row) => row._item === item);
|
|
484
484
|
const cell = row && [...row.children].find((cell) => cell._column === column);
|
|
485
|
-
|
|
485
|
+
if (cell) {
|
|
486
|
+
cell.focus();
|
|
487
|
+
}
|
|
486
488
|
}
|
|
487
489
|
|
|
488
490
|
/** @private */
|
|
@@ -497,7 +499,9 @@ class Grid extends ElementMixin(
|
|
|
497
499
|
virtualizer.flush();
|
|
498
500
|
|
|
499
501
|
// If the focused cell's parent row got hidden by the size change, focus the corresponding new cell
|
|
500
|
-
cellCoordinates && cell.parentElement.hidden
|
|
502
|
+
if (cellCoordinates && cell.parentElement.hidden) {
|
|
503
|
+
this.__focusBodyCell(cellCoordinates);
|
|
504
|
+
}
|
|
501
505
|
|
|
502
506
|
// Make sure the body has a tabbable element
|
|
503
507
|
this._resetKeyboardNavigation();
|
|
@@ -626,7 +630,7 @@ class Grid extends ElementMixin(
|
|
|
626
630
|
|
|
627
631
|
if (this._columnTree) {
|
|
628
632
|
this._columnTree[this._columnTree.length - 1].forEach(
|
|
629
|
-
(c) => c.isConnected && c.notifyPath && c.notifyPath('_cells.*', c._cells)
|
|
633
|
+
(c) => c.isConnected && c.notifyPath && c.notifyPath('_cells.*', c._cells),
|
|
630
634
|
);
|
|
631
635
|
}
|
|
632
636
|
|
|
@@ -642,7 +646,7 @@ class Grid extends ElementMixin(
|
|
|
642
646
|
/** @private */
|
|
643
647
|
_createCell(tagName) {
|
|
644
648
|
const contentId = (this._contentIndex = this._contentIndex + 1 || 0);
|
|
645
|
-
const slotName =
|
|
649
|
+
const slotName = `vaadin-grid-cell-content-${contentId}`;
|
|
646
650
|
|
|
647
651
|
const cellContent = document.createElement('vaadin-grid-cell-content');
|
|
648
652
|
cellContent.setAttribute('slot', slotName);
|
|
@@ -669,7 +673,7 @@ class Grid extends ElementMixin(
|
|
|
669
673
|
// If focus is on element within the cell content — respect it, do not change
|
|
670
674
|
const contentContainsFocusedElement = cellContent.contains(this.getRootNode().activeElement);
|
|
671
675
|
// Only focus if mouse is released on cell content itself
|
|
672
|
-
const mouseUpWithinCell =
|
|
676
|
+
const mouseUpWithinCell = event.composedPath().includes(cellContent);
|
|
673
677
|
if (!contentContainsFocusedElement && mouseUpWithinCell) {
|
|
674
678
|
cell.focus();
|
|
675
679
|
}
|
|
@@ -850,7 +854,7 @@ class Grid extends ElementMixin(
|
|
|
850
854
|
*/
|
|
851
855
|
_renderColumnTree(columnTree) {
|
|
852
856
|
Array.from(this.$.items.children).forEach((row) =>
|
|
853
|
-
this._updateRow(row, columnTree[columnTree.length - 1], null, false, true)
|
|
857
|
+
this._updateRow(row, columnTree[columnTree.length - 1], null, false, true),
|
|
854
858
|
);
|
|
855
859
|
|
|
856
860
|
while (this.$.header.children.length < columnTree.length) {
|
|
@@ -872,11 +876,11 @@ class Grid extends ElementMixin(
|
|
|
872
876
|
}
|
|
873
877
|
|
|
874
878
|
Array.from(this.$.header.children).forEach((headerRow, index) =>
|
|
875
|
-
this._updateRow(headerRow, columnTree[index], 'header', index === columnTree.length - 1)
|
|
879
|
+
this._updateRow(headerRow, columnTree[index], 'header', index === columnTree.length - 1),
|
|
876
880
|
);
|
|
877
881
|
|
|
878
882
|
Array.from(this.$.footer.children).forEach((footerRow, index) =>
|
|
879
|
-
this._updateRow(footerRow, columnTree[columnTree.length - 1 - index], 'footer', index === 0)
|
|
883
|
+
this._updateRow(footerRow, columnTree[columnTree.length - 1 - index], 'footer', index === 0),
|
|
880
884
|
);
|
|
881
885
|
|
|
882
886
|
// Sizer rows
|
|
@@ -952,8 +956,6 @@ class Grid extends ElementMixin(
|
|
|
952
956
|
|
|
953
957
|
requestAnimationFrame(() => {
|
|
954
958
|
this.__scrollToPendingIndex();
|
|
955
|
-
// This needs to be set programmatically in order to avoid an iOS 10 bug (disappearing grid)
|
|
956
|
-
this.$.table.style.webkitOverflowScrolling = 'touch';
|
|
957
959
|
});
|
|
958
960
|
}
|
|
959
961
|
}
|
|
@@ -970,7 +972,7 @@ class Grid extends ElementMixin(
|
|
|
970
972
|
level: this._getIndexLevel(row.index),
|
|
971
973
|
expanded: this._isExpanded(row._item),
|
|
972
974
|
selected: this._isSelected(row._item),
|
|
973
|
-
detailsOpened: !!this.rowDetailsRenderer && this._isDetailsOpened(row._item)
|
|
975
|
+
detailsOpened: !!this.rowDetailsRenderer && this._isDetailsOpened(row._item),
|
|
974
976
|
};
|
|
975
977
|
}
|
|
976
978
|
|
|
@@ -1001,7 +1003,9 @@ class Grid extends ElementMixin(
|
|
|
1001
1003
|
|
|
1002
1004
|
/** @protected */
|
|
1003
1005
|
__updateVisibleRows(start, end) {
|
|
1004
|
-
|
|
1006
|
+
if (this.__virtualizer) {
|
|
1007
|
+
this.__virtualizer.update(start, end);
|
|
1008
|
+
}
|
|
1005
1009
|
}
|
|
1006
1010
|
|
|
1007
1011
|
/**
|
|
@@ -1015,7 +1019,7 @@ class Grid extends ElementMixin(
|
|
|
1015
1019
|
*/
|
|
1016
1020
|
notifyResize() {
|
|
1017
1021
|
console.warn(
|
|
1018
|
-
`WARNING: Since Vaadin 22, notifyResize() is deprecated. The component uses a ResizeObserver internally and doesn't need to be explicitly notified of resizes
|
|
1022
|
+
`WARNING: Since Vaadin 22, notifyResize() is deprecated. The component uses a ResizeObserver internally and doesn't need to be explicitly notified of resizes.`,
|
|
1019
1023
|
);
|
|
1020
1024
|
}
|
|
1021
1025
|
}
|
|
@@ -393,7 +393,7 @@ registerStyles(
|
|
|
393
393
|
border-right-color: var(--_lumo-grid-border-color);
|
|
394
394
|
}
|
|
395
395
|
`,
|
|
396
|
-
{ moduleId: 'lumo-grid' }
|
|
396
|
+
{ moduleId: 'lumo-grid' },
|
|
397
397
|
);
|
|
398
398
|
|
|
399
399
|
registerStyles(
|
|
@@ -403,5 +403,5 @@ registerStyles(
|
|
|
403
403
|
font-size: var(--lumo-font-size-m);
|
|
404
404
|
}
|
|
405
405
|
`,
|
|
406
|
-
{ moduleId: 'vaadin-grid-select-all-checkbox-lumo' }
|
|
406
|
+
{ moduleId: 'vaadin-grid-select-all-checkbox-lumo' },
|
|
407
407
|
);
|