@vaadin/grid 23.2.0-dev.8a7678b70 → 23.2.1

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.
Files changed (40) hide show
  1. package/README.md +4 -4
  2. package/package.json +17 -11
  3. package/src/array-data-provider.js +3 -5
  4. package/src/lit/column-renderer-directives.d.ts +7 -6
  5. package/src/lit/renderer-directives.d.ts +3 -3
  6. package/src/vaadin-grid-active-item-mixin.d.ts +2 -2
  7. package/src/vaadin-grid-array-data-provider-mixin.d.ts +2 -2
  8. package/src/vaadin-grid-column-group.d.ts +2 -2
  9. package/src/vaadin-grid-column-group.js +22 -7
  10. package/src/vaadin-grid-column-reordering-mixin.d.ts +2 -2
  11. package/src/vaadin-grid-column-reordering-mixin.js +31 -10
  12. package/src/vaadin-grid-column.d.ts +4 -4
  13. package/src/vaadin-grid-column.js +9 -3
  14. package/src/vaadin-grid-data-provider-mixin.d.ts +2 -2
  15. package/src/vaadin-grid-drag-and-drop-mixin.d.ts +5 -5
  16. package/src/vaadin-grid-drag-and-drop-mixin.js +3 -1
  17. package/src/vaadin-grid-event-context-mixin.d.ts +4 -4
  18. package/src/vaadin-grid-filter-column.d.ts +1 -1
  19. package/src/vaadin-grid-filter.d.ts +2 -2
  20. package/src/vaadin-grid-keyboard-navigation-mixin.js +10 -6
  21. package/src/vaadin-grid-row-details-mixin.d.ts +3 -3
  22. package/src/vaadin-grid-scroll-mixin.d.ts +2 -2
  23. package/src/vaadin-grid-scroll-mixin.js +3 -1
  24. package/src/vaadin-grid-selection-column.d.ts +3 -3
  25. package/src/vaadin-grid-selection-column.js +10 -3
  26. package/src/vaadin-grid-selection-mixin.d.ts +2 -2
  27. package/src/vaadin-grid-sort-column.d.ts +4 -4
  28. package/src/vaadin-grid-sort-mixin.d.ts +25 -2
  29. package/src/vaadin-grid-sort-mixin.js +60 -5
  30. package/src/vaadin-grid-sorter.d.ts +2 -2
  31. package/src/vaadin-grid-sorter.js +7 -3
  32. package/src/vaadin-grid-styling-mixin.d.ts +4 -4
  33. package/src/vaadin-grid-tree-column.d.ts +1 -1
  34. package/src/vaadin-grid-tree-toggle.d.ts +2 -2
  35. package/src/vaadin-grid-tree-toggle.js +3 -3
  36. package/src/vaadin-grid.d.ts +26 -24
  37. package/src/vaadin-grid.js +13 -4
  38. package/theme/lumo/vaadin-grid-styles.js +0 -10
  39. package/web-types.json +2176 -0
  40. package/web-types.lit.json +972 -0
@@ -3,7 +3,7 @@
3
3
  * Copyright (c) 2016 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
- import { GridDefaultItem } from './vaadin-grid.js';
6
+ import type { GridDefaultItem } from './vaadin-grid.js';
7
7
  import { GridColumn } from './vaadin-grid-column.js';
8
8
 
9
9
  /**
@@ -57,13 +57,13 @@ declare class GridSelectionColumn<TItem = GridDefaultItem> extends GridColumn<TI
57
57
  addEventListener<K extends keyof GridSelectionColumnEventMap>(
58
58
  type: K,
59
59
  listener: (this: GridSelectionColumn<TItem>, ev: GridSelectionColumnEventMap[K]) => void,
60
- options?: boolean | AddEventListenerOptions,
60
+ options?: AddEventListenerOptions | boolean,
61
61
  ): void;
62
62
 
63
63
  removeEventListener<K extends keyof GridSelectionColumnEventMap>(
64
64
  type: K,
65
65
  listener: (this: GridSelectionColumn<TItem>, ev: GridSelectionColumnEventMap[K]) => void,
66
- options?: boolean | EventListenerOptions,
66
+ options?: EventListenerOptions | boolean,
67
67
  ): void;
68
68
  }
69
69
 
@@ -184,8 +184,10 @@ class GridSelectionColumn extends GridColumn {
184
184
  return;
185
185
  }
186
186
 
187
- if (selectAll && Array.isArray(this._grid.items)) {
188
- this.__withFilteredItemsArray((items) => (this._grid.selectedItems = items));
187
+ if (selectAll && this.__hasArrayDataProvider()) {
188
+ this.__withFilteredItemsArray((items) => {
189
+ this._grid.selectedItems = items;
190
+ });
189
191
  } else {
190
192
  this._grid.selectedItems = [];
191
193
  }
@@ -254,10 +256,15 @@ class GridSelectionColumn extends GridColumn {
254
256
  this.__previousActiveItem = activeItem;
255
257
  }
256
258
 
259
+ /** @private */
260
+ __hasArrayDataProvider() {
261
+ return Array.isArray(this._grid.items) && !!this._grid.dataProvider;
262
+ }
263
+
257
264
  /** @private */
258
265
  __onSelectedItemsChanged() {
259
266
  this._selectAllChangeLock = true;
260
- if (Array.isArray(this._grid.items)) {
267
+ if (this.__hasArrayDataProvider()) {
261
268
  this.__withFilteredItemsArray((items) => {
262
269
  if (!this._grid.selectedItems.length) {
263
270
  this.selectAll = false;
@@ -3,11 +3,11 @@
3
3
  * Copyright (c) 2016 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
- import { Constructor } from '@open-wc/dedupe-mixin';
6
+ import type { Constructor } from '@open-wc/dedupe-mixin';
7
7
 
8
8
  export declare function SelectionMixin<TItem, T extends Constructor<HTMLElement>>(
9
9
  base: T,
10
- ): T & Constructor<SelectionMixinClass<TItem>>;
10
+ ): Constructor<SelectionMixinClass<TItem>> & T;
11
11
 
12
12
  export declare class SelectionMixinClass<TItem> {
13
13
  /**
@@ -3,9 +3,9 @@
3
3
  * Copyright (c) 2016 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
- import { GridDefaultItem } from './vaadin-grid.js';
6
+ import type { GridDefaultItem } from './vaadin-grid.js';
7
7
  import { GridColumn } from './vaadin-grid-column.js';
8
- import { GridSorterDirection } from './vaadin-grid-sorter.js';
8
+ import type { GridSorterDirection } from './vaadin-grid-sorter.js';
9
9
 
10
10
  /**
11
11
  * Fired when the `direction` property changes.
@@ -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?: AddEventListenerOptions | boolean,
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?: EventListenerOptions | boolean,
59
59
  ): void;
60
60
  }
61
61
 
@@ -3,14 +3,37 @@
3
3
  * Copyright (c) 2016 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
- import { Constructor } from '@open-wc/dedupe-mixin';
6
+ import type { Constructor } from '@open-wc/dedupe-mixin';
7
7
 
8
- export declare function SortMixin<T extends Constructor<HTMLElement>>(base: T): T & Constructor<SortMixinClass>;
8
+ export declare function SortMixin<T extends Constructor<HTMLElement>>(base: T): Constructor<SortMixinClass> & T;
9
9
 
10
10
  export declare class SortMixinClass {
11
+ /**
12
+ * Sets the default multi-sort priority to use for all grid instances.
13
+ * This method should be called before creating any grid instances.
14
+ * Changing this setting does not affect the default for existing grids.
15
+ */
16
+ static setDefaultMultiSortPriority(priority: 'append' | 'prepend'): void;
17
+
11
18
  /**
12
19
  * When `true`, all `<vaadin-grid-sorter>` are applied for sorting.
13
20
  * @attr {boolean} multi-sort
14
21
  */
15
22
  multiSort: boolean;
23
+
24
+ /**
25
+ * Controls how columns are added to the sort order when using multi-sort.
26
+ * The sort order is visually indicated by numbers in grid sorters placed in column headers.
27
+ *
28
+ * By default, whenever an unsorted column is sorted, or the sort-direction of a column is
29
+ * changed, that column gets sort priority 1, thus affecting the priority for all the other
30
+ * sorted columns. This is identical to using `multi-sort-priority="prepend"`.
31
+ *
32
+ * Using this property allows to change this behavior so that sorting an unsorted column
33
+ * would add it to the "end" of the sort, and changing column's sort direction would retain
34
+ * it's previous priority. To set this, use `multi-sort-priority="append"`.
35
+ *
36
+ * @attr {string} multi-sort-priority
37
+ */
38
+ multiSortPriority: 'append' | 'prepend';
16
39
  }
@@ -4,6 +4,8 @@
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
 
7
+ let defaultMultiSortPriority = 'prepend';
8
+
7
9
  /**
8
10
  * @polymerMixin
9
11
  */
@@ -21,6 +23,25 @@ export const SortMixin = (superClass) =>
21
23
  value: false,
22
24
  },
23
25
 
26
+ /**
27
+ * Controls how columns are added to the sort order when using multi-sort.
28
+ * The sort order is visually indicated by numbers in grid sorters placed in column headers.
29
+ *
30
+ * By default, whenever an unsorted column is sorted, or the sort-direction of a column is
31
+ * changed, that column gets sort priority 1, thus affecting the priority for all the other
32
+ * sorted columns. This is identical to using `multi-sort-priority="prepend"`.
33
+ *
34
+ * Using this property allows to change this behavior so that sorting an unsorted column
35
+ * would add it to the "end" of the sort, and changing column's sort direction would retain
36
+ * it's previous priority. To set this, use `multi-sort-priority="append"`.
37
+ *
38
+ * @attr {string} multi-sort-priority
39
+ */
40
+ multiSortPriority: {
41
+ type: String,
42
+ value: () => defaultMultiSortPriority,
43
+ },
44
+
24
45
  /**
25
46
  * @type {!Array<!GridSorterDefinition>}
26
47
  * @protected
@@ -38,6 +59,17 @@ export const SortMixin = (superClass) =>
38
59
  };
39
60
  }
40
61
 
62
+ /**
63
+ * Sets the default multi-sort priority to use for all grid instances.
64
+ * This method should be called before creating any grid instances.
65
+ * Changing this setting does not affect the default for existing grids.
66
+ *
67
+ * @param {string} priority
68
+ */
69
+ static setDefaultMultiSortPriority(priority) {
70
+ defaultMultiSortPriority = ['append', 'prepend'].includes(priority) ? priority : 'prepend';
71
+ }
72
+
41
73
  /** @protected */
42
74
  ready() {
43
75
  super.ready();
@@ -48,6 +80,7 @@ export const SortMixin = (superClass) =>
48
80
  _onSorterChanged(e) {
49
81
  const sorter = e.target;
50
82
  e.stopPropagation();
83
+ sorter._grid = this;
51
84
  this.__updateSorter(sorter);
52
85
  this.__applySorters();
53
86
  }
@@ -67,7 +100,29 @@ export const SortMixin = (superClass) =>
67
100
 
68
101
  /** @private */
69
102
  __updateSortOrders() {
70
- this._sorters.forEach((sorter, index) => (sorter._order = this._sorters.length > 1 ? index : null), this);
103
+ this._sorters.forEach((sorter, index) => {
104
+ sorter._order = this._sorters.length > 1 ? index : null;
105
+ });
106
+ }
107
+
108
+ /** @private */
109
+ __appendSorter(sorter) {
110
+ if (!sorter.direction) {
111
+ this._removeArrayItem(this._sorters, sorter);
112
+ } else if (!this._sorters.includes(sorter)) {
113
+ this._sorters.push(sorter);
114
+ }
115
+
116
+ this.__updateSortOrders();
117
+ }
118
+
119
+ /** @private */
120
+ __prependSorter(sorter) {
121
+ this._removeArrayItem(this._sorters, sorter);
122
+ if (sorter.direction) {
123
+ this._sorters.unshift(sorter);
124
+ }
125
+ this.__updateSortOrders();
71
126
  }
72
127
 
73
128
  /** @private */
@@ -79,11 +134,11 @@ export const SortMixin = (superClass) =>
79
134
  sorter._order = null;
80
135
 
81
136
  if (this.multiSort) {
82
- this._removeArrayItem(this._sorters, sorter);
83
- if (sorter.direction) {
84
- this._sorters.unshift(sorter);
137
+ if (this.multiSortPriority === 'append') {
138
+ this.__appendSorter(sorter);
139
+ } else {
140
+ this.__prependSorter(sorter);
85
141
  }
86
- this.__updateSortOrders();
87
142
  } else if (sorter.direction) {
88
143
  const otherSorters = this._sorters.filter((s) => s !== sorter);
89
144
  this._sorters = [sorter];
@@ -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?: AddEventListenerOptions | boolean,
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?: EventListenerOptions | boolean,
86
86
  ): void;
87
87
  }
88
88
 
@@ -7,9 +7,9 @@ import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
7
7
  import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
8
8
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
9
9
 
10
- const $_documentContainer = document.createElement('template');
10
+ const template = document.createElement('template');
11
11
 
12
- $_documentContainer.innerHTML = `
12
+ template.innerHTML = `
13
13
  <style>
14
14
  @font-face {
15
15
  font-family: 'vaadin-grid-sorter-icons';
@@ -20,7 +20,7 @@ $_documentContainer.innerHTML = `
20
20
  </style>
21
21
  `;
22
22
 
23
- document.head.appendChild($_documentContainer.content);
23
+ document.head.appendChild(template.content);
24
24
 
25
25
  /**
26
26
  * `<vaadin-grid-sorter>` is a helper element for the `<vaadin-grid>` that provides out-of-the-box UI controls,
@@ -176,6 +176,10 @@ class GridSorter extends ThemableMixin(DirMixin(PolymerElement)) {
176
176
  disconnectedCallback() {
177
177
  super.disconnectedCallback();
178
178
  this._isConnected = false;
179
+
180
+ if (!this.parentNode && this._grid) {
181
+ this._grid.__removeSorters([this]);
182
+ }
179
183
  }
180
184
 
181
185
  /** @private */
@@ -3,15 +3,15 @@
3
3
  * Copyright (c) 2016 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
- import { Constructor } from '@open-wc/dedupe-mixin';
7
- import { GridItemModel } from './vaadin-grid.js';
8
- import { GridColumn } from './vaadin-grid-column.js';
6
+ import type { Constructor } from '@open-wc/dedupe-mixin';
7
+ import type { GridItemModel } from './vaadin-grid.js';
8
+ import type { GridColumn } from './vaadin-grid-column.js';
9
9
 
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
13
  base: T,
14
- ): T & Constructor<StylingMixinClass<TItem>>;
14
+ ): Constructor<StylingMixinClass<TItem>> & T;
15
15
 
16
16
  export declare class StylingMixinClass<TItem> {
17
17
  /**
@@ -3,7 +3,7 @@
3
3
  * Copyright (c) 2016 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
- import { GridDefaultItem } from './vaadin-grid.js';
6
+ import type { GridDefaultItem } from './vaadin-grid.js';
7
7
  import { GridColumn } from './vaadin-grid-column.js';
8
8
 
9
9
  /**
@@ -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?: AddEventListenerOptions | boolean,
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?: EventListenerOptions | boolean,
95
95
  ): void;
96
96
  }
97
97
 
@@ -8,9 +8,9 @@ import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
8
8
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
9
9
  import { isFocusable } from './vaadin-grid-active-item-mixin.js';
10
10
 
11
- const $_documentContainer = document.createElement('template');
11
+ const template = document.createElement('template');
12
12
 
13
- $_documentContainer.innerHTML = `
13
+ template.innerHTML = `
14
14
  <style>
15
15
  @font-face {
16
16
  font-family: "vaadin-grid-tree-icons";
@@ -21,7 +21,7 @@ $_documentContainer.innerHTML = `
21
21
  </style>
22
22
  `;
23
23
 
24
- document.head.appendChild($_documentContainer.content);
24
+ document.head.appendChild(template.content);
25
25
 
26
26
  /**
27
27
  * `<vaadin-grid-tree-toggle>` is a helper element for the `<vaadin-grid>`
@@ -3,15 +3,17 @@
3
3
  * Copyright (c) 2016 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
- import { DisabledMixinClass } from '@vaadin/component-base/src/disabled-mixin.js';
7
- import { ElementMixinClass } from '@vaadin/component-base/src/element-mixin.js';
8
- import { ThemableMixinClass } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
9
- import { ActiveItemMixinClass } from './vaadin-grid-active-item-mixin.js';
10
- import { ArrayDataProviderMixinClass } from './vaadin-grid-array-data-provider-mixin.js';
11
- import { GridBodyRenderer, GridColumn, GridHeaderFooterRenderer } from './vaadin-grid-column.js';
12
- import { ColumnReorderingMixinClass } from './vaadin-grid-column-reordering-mixin.js';
6
+ import type { DisabledMixinClass } from '@vaadin/component-base/src/disabled-mixin.js';
7
+ import type { ElementMixinClass } from '@vaadin/component-base/src/element-mixin.js';
8
+ import type { ThemableMixinClass } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
9
+ import type { ThemePropertyMixinClass } from '@vaadin/vaadin-themable-mixin/vaadin-theme-property-mixin.js';
10
+ import type { ActiveItemMixinClass } from './vaadin-grid-active-item-mixin.js';
11
+ import type { ArrayDataProviderMixinClass } from './vaadin-grid-array-data-provider-mixin.js';
12
+ import type { GridColumn } from './vaadin-grid-column.js';
13
+ import { GridBodyRenderer, GridHeaderFooterRenderer } from './vaadin-grid-column.js';
14
+ import type { ColumnReorderingMixinClass } from './vaadin-grid-column-reordering-mixin.js';
15
+ import type { DataProviderMixinClass } from './vaadin-grid-data-provider-mixin.js';
13
16
  import {
14
- DataProviderMixinClass,
15
17
  GridDataProvider,
16
18
  GridDataProviderCallback,
17
19
  GridDataProviderParams,
@@ -19,18 +21,17 @@ import {
19
21
  GridSorterDefinition,
20
22
  GridSorterDirection,
21
23
  } from './vaadin-grid-data-provider-mixin.js';
22
- import {
23
- DragAndDropMixinClass,
24
- GridDragAndDropFilter,
25
- GridDropLocation,
26
- GridDropMode,
27
- } from './vaadin-grid-drag-and-drop-mixin.js';
28
- import { EventContextMixinClass, GridEventContext } from './vaadin-grid-event-context-mixin.js';
29
- import { GridRowDetailsRenderer, RowDetailsMixinClass } from './vaadin-grid-row-details-mixin.js';
30
- import { ScrollMixinClass } from './vaadin-grid-scroll-mixin.js';
31
- import { SelectionMixinClass } from './vaadin-grid-selection-mixin.js';
32
- import { SortMixinClass } from './vaadin-grid-sort-mixin.js';
33
- import { GridCellClassNameGenerator, StylingMixinClass } from './vaadin-grid-styling-mixin.js';
24
+ import type { DragAndDropMixinClass } from './vaadin-grid-drag-and-drop-mixin.js';
25
+ import { GridDragAndDropFilter, GridDropLocation, GridDropMode } from './vaadin-grid-drag-and-drop-mixin.js';
26
+ import type { EventContextMixinClass } from './vaadin-grid-event-context-mixin.js';
27
+ import { GridEventContext } from './vaadin-grid-event-context-mixin.js';
28
+ import type { RowDetailsMixinClass } from './vaadin-grid-row-details-mixin.js';
29
+ import { GridRowDetailsRenderer } from './vaadin-grid-row-details-mixin.js';
30
+ import type { ScrollMixinClass } from './vaadin-grid-scroll-mixin.js';
31
+ import type { SelectionMixinClass } from './vaadin-grid-selection-mixin.js';
32
+ import type { SortMixinClass } from './vaadin-grid-sort-mixin.js';
33
+ import type { StylingMixinClass } from './vaadin-grid-styling-mixin.js';
34
+ import { GridCellClassNameGenerator } from './vaadin-grid-styling-mixin.js';
34
35
 
35
36
  export {
36
37
  GridBodyRenderer,
@@ -305,7 +306,7 @@ export interface GridEventMap<TItem> extends HTMLElementEventMap, GridCustomEven
305
306
  * `overflow` | Set when rows are overflowing the grid viewport. Possible values: `top`, `bottom`, `start`, `end` | :host
306
307
  * `reordering` | Set when the grid's columns are being reordered | :host
307
308
  * `dragover` | Set when the grid (not a specific row) is dragged over | :host
308
- * `dragging-rows` : Set when grid rows are dragged | :host
309
+ * `dragging-rows` | Set when grid rows are dragged | :host
309
310
  * `reorder-status` | Reflects the status of a cell while columns are being reordered | cell
310
311
  * `frozen` | Frozen cell | cell
311
312
  * `last-frozen` | Last frozen cell | cell
@@ -323,7 +324,7 @@ export interface GridEventMap<TItem> extends HTMLElementEventMap, GridCustomEven
323
324
  * `drag-disabled` | Set to a row that isn't available for dragging | row
324
325
  * `drop-disabled` | Set to a row that can't be dropped on top of | row
325
326
  *
326
- * See [Styling Components](https://vaadin.com/docs/latest/ds/customization/styling-components) documentation.
327
+ * See [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.
327
328
  *
328
329
  * @fires {CustomEvent} active-item-changed - Fired when the `activeItem` property changes.
329
330
  * @fires {CustomEvent} cell-activate - Fired when the cell is activated with click or keyboard.
@@ -379,13 +380,13 @@ declare class Grid<TItem = GridDefaultItem> extends HTMLElement {
379
380
  addEventListener<K extends keyof GridEventMap<TItem>>(
380
381
  type: K,
381
382
  listener: (this: Grid<TItem>, ev: GridEventMap<TItem>[K]) => void,
382
- options?: boolean | AddEventListenerOptions,
383
+ options?: AddEventListenerOptions | boolean,
383
384
  ): void;
384
385
 
385
386
  removeEventListener<K extends keyof GridEventMap<TItem>>(
386
387
  type: K,
387
388
  listener: (this: Grid<TItem>, ev: GridEventMap<TItem>[K]) => void,
388
- options?: boolean | EventListenerOptions,
389
+ options?: EventListenerOptions | boolean,
389
390
  ): void;
390
391
  }
391
392
 
@@ -393,6 +394,7 @@ interface Grid<TItem = GridDefaultItem>
393
394
  extends DisabledMixinClass,
394
395
  ElementMixinClass,
395
396
  ThemableMixinClass,
397
+ ThemePropertyMixinClass,
396
398
  ActiveItemMixinClass<TItem>,
397
399
  ArrayDataProviderMixinClass<TItem>,
398
400
  DataProviderMixinClass<TItem>,
@@ -191,7 +191,7 @@ import { StylingMixin } from './vaadin-grid-styling-mixin.js';
191
191
  * `overflow` | Set when rows are overflowing the grid viewport. Possible values: `top`, `bottom`, `start`, `end` | :host
192
192
  * `reordering` | Set when the grid's columns are being reordered | :host
193
193
  * `dragover` | Set when the grid (not a specific row) is dragged over | :host
194
- * `dragging-rows` : Set when grid rows are dragged | :host
194
+ * `dragging-rows` | Set when grid rows are dragged | :host
195
195
  * `reorder-status` | Reflects the status of a cell while columns are being reordered | cell
196
196
  * `frozen` | Frozen cell | cell
197
197
  * `last-frozen` | Last frozen cell | cell
@@ -209,7 +209,7 @@ import { StylingMixin } from './vaadin-grid-styling-mixin.js';
209
209
  * `drag-disabled` | Set to a row that isn't available for dragging | row
210
210
  * `drop-disabled` | Set to a row that can't be dropped on top of | row
211
211
  *
212
- * See [Styling Components](https://vaadin.com/docs/latest/ds/customization/styling-components) documentation.
212
+ * See [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.
213
213
  *
214
214
  * @fires {CustomEvent} active-item-changed - Fired when the `activeItem` property changes.
215
215
  * @fires {CustomEvent} cell-activate - Fired when the cell is activated with click or keyboard.
@@ -594,6 +594,11 @@ class Grid extends ElementMixin(
594
594
  // Flush to make sure DOM is up-to-date when measuring the column widths
595
595
  this.__virtualizer.flush();
596
596
 
597
+ // Flush to account for any changes to the visibility of the columns
598
+ if (this._debouncerHiddenChanged) {
599
+ this._debouncerHiddenChanged.flush();
600
+ }
601
+
597
602
  cols.forEach((col) => {
598
603
  col.width = `${this.__getDistributedWidth(col)}px`;
599
604
  });
@@ -708,7 +713,9 @@ class Grid extends ElementMixin(
708
713
 
709
714
  const contentsFragment = document.createDocumentFragment();
710
715
 
711
- Array.from(row.children).forEach((cell) => (cell._vacant = true));
716
+ Array.from(row.children).forEach((cell) => {
717
+ cell._vacant = true;
718
+ });
712
719
  row.innerHTML = '';
713
720
 
714
721
  columns
@@ -993,7 +1000,9 @@ class Grid extends ElementMixin(
993
1000
  // Header and footer renderers
994
1001
  this._columnTree.forEach((level) => {
995
1002
  level.forEach((column) => {
996
- column._renderHeaderAndFooter();
1003
+ if (column._renderHeaderAndFooter) {
1004
+ column._renderHeaderAndFooter();
1005
+ }
997
1006
  });
998
1007
  });
999
1008
 
@@ -395,13 +395,3 @@ registerStyles(
395
395
  `,
396
396
  { moduleId: 'lumo-grid' },
397
397
  );
398
-
399
- registerStyles(
400
- 'vaadin-checkbox',
401
- css`
402
- :host(.vaadin-grid-select-all-checkbox) {
403
- font-size: var(--lumo-font-size-m);
404
- }
405
- `,
406
- { moduleId: 'vaadin-grid-select-all-checkbox-lumo' },
407
- );