@vaadin/grid
Advanced tools
Comparing version 24.0.0-alpha10 to 24.0.0-alpha11
{ | ||
"name": "@vaadin/grid", | ||
"version": "24.0.0-alpha10", | ||
"version": "24.0.0-alpha11", | ||
"publishConfig": { | ||
@@ -49,13 +49,13 @@ "access": "public" | ||
"@polymer/polymer": "^3.0.0", | ||
"@vaadin/checkbox": "24.0.0-alpha10", | ||
"@vaadin/component-base": "24.0.0-alpha10", | ||
"@vaadin/lit-renderer": "24.0.0-alpha10", | ||
"@vaadin/text-field": "24.0.0-alpha10", | ||
"@vaadin/vaadin-lumo-styles": "24.0.0-alpha10", | ||
"@vaadin/vaadin-material-styles": "24.0.0-alpha10", | ||
"@vaadin/vaadin-themable-mixin": "24.0.0-alpha10" | ||
"@vaadin/checkbox": "24.0.0-alpha11", | ||
"@vaadin/component-base": "24.0.0-alpha11", | ||
"@vaadin/lit-renderer": "24.0.0-alpha11", | ||
"@vaadin/text-field": "24.0.0-alpha11", | ||
"@vaadin/vaadin-lumo-styles": "24.0.0-alpha11", | ||
"@vaadin/vaadin-material-styles": "24.0.0-alpha11", | ||
"@vaadin/vaadin-themable-mixin": "24.0.0-alpha11" | ||
}, | ||
"devDependencies": { | ||
"@esm-bundle/chai": "^4.3.4", | ||
"@vaadin/polymer-legacy-adapter": "24.0.0-alpha10", | ||
"@vaadin/polymer-legacy-adapter": "24.0.0-alpha11", | ||
"@vaadin/testing-helpers": "^0.3.2", | ||
@@ -69,3 +69,3 @@ "lit": "^2.0.0", | ||
], | ||
"gitHead": "2e04534d8b47bcd216f89b5f849bafef1a73b174" | ||
"gitHead": "641b3d96ceeb3e503a093682ebe686afdd8c3a68" | ||
} |
@@ -68,3 +68,3 @@ /** | ||
const cellContentHasFocus = cellContent.contains(activeElement); | ||
if (!cellContentHasFocus && !this._isFocusable(e.target)) { | ||
if (!cellContentHasFocus && !this._isFocusable(e.target) && !(e.target instanceof HTMLLabelElement)) { | ||
this.dispatchEvent( | ||
@@ -71,0 +71,0 @@ new CustomEvent('cell-activate', { |
@@ -97,3 +97,3 @@ /** | ||
sorter._grid = this; | ||
this.__updateSorter(sorter, e.detail.shiftClick); | ||
this.__updateSorter(sorter, e.detail.shiftClick, e.detail.fromSorterClick); | ||
this.__applySorters(); | ||
@@ -143,3 +143,3 @@ } | ||
/** @private */ | ||
__updateSorter(sorter, shiftClick) { | ||
__updateSorter(sorter, shiftClick, fromSorterClick) { | ||
if (!sorter.direction && this._sorters.indexOf(sorter) === -1) { | ||
@@ -151,3 +151,6 @@ return; | ||
if ((this.multiSort && !this.multiSortOnShiftClick) || (this.multiSortOnShiftClick && shiftClick)) { | ||
if ( | ||
(this.multiSort && (!this.multiSortOnShiftClick || !fromSorterClick)) || | ||
(this.multiSortOnShiftClick && shiftClick) | ||
) { | ||
if (this.multiSortPriority === 'append') { | ||
@@ -154,0 +157,0 @@ this.__appendSorter(sorter); |
@@ -14,3 +14,3 @@ /** | ||
*/ | ||
export type GridSorterChangedEvent = CustomEvent<{ shiftClick: boolean }>; | ||
export type GridSorterChangedEvent = CustomEvent<{ shiftClick: boolean; fromSorterClick: boolean }>; | ||
@@ -17,0 +17,0 @@ /** |
@@ -156,8 +156,2 @@ /** | ||
}, | ||
/** @private */ | ||
_shiftClick: { | ||
type: Boolean, | ||
value: false, | ||
}, | ||
}; | ||
@@ -214,3 +208,3 @@ } | ||
new CustomEvent('sorter-changed', { | ||
detail: { shiftClick: this._shiftClick }, | ||
detail: { shiftClick: Boolean(this._shiftClick), fromSorterClick: Boolean(this._fromSorterClick) }, | ||
bubbles: true, | ||
@@ -220,2 +214,5 @@ composed: true, | ||
); | ||
// Cleaning up as a programatically sorting can be done after some user interaction | ||
this._fromSorterClick = false; | ||
this._shiftClick = false; | ||
} | ||
@@ -243,2 +240,3 @@ | ||
this._shiftClick = e.shiftKey; | ||
this._fromSorterClick = true; | ||
if (this.direction === 'asc') { | ||
@@ -245,0 +243,0 @@ this.direction = 'desc'; |
@@ -195,3 +195,3 @@ /** | ||
} | ||
if (isFocusable(e.target)) { | ||
if (isFocusable(e.target) || e.target instanceof HTMLLabelElement) { | ||
return; | ||
@@ -198,0 +198,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
562308
13631
+ Added@vaadin/checkbox@24.0.0-alpha11(transitive)
+ Added@vaadin/component-base@24.0.0-alpha11(transitive)
+ Added@vaadin/field-base@24.0.0-alpha11(transitive)
+ Added@vaadin/icon@24.0.0-alpha11(transitive)
+ Added@vaadin/input-container@24.0.0-alpha11(transitive)
+ Added@vaadin/lit-renderer@24.0.0-alpha11(transitive)
+ Added@vaadin/text-field@24.0.0-alpha11(transitive)
+ Added@vaadin/vaadin-lumo-styles@24.0.0-alpha11(transitive)
+ Added@vaadin/vaadin-material-styles@24.0.0-alpha11(transitive)
+ Added@vaadin/vaadin-themable-mixin@24.0.0-alpha11(transitive)
- Removed@vaadin/checkbox@24.0.0-alpha10(transitive)
- Removed@vaadin/component-base@24.0.0-alpha10(transitive)
- Removed@vaadin/field-base@24.0.0-alpha10(transitive)
- Removed@vaadin/icon@24.0.0-alpha10(transitive)
- Removed@vaadin/input-container@24.0.0-alpha10(transitive)
- Removed@vaadin/lit-renderer@24.0.0-alpha10(transitive)
- Removed@vaadin/text-field@24.0.0-alpha10(transitive)
- Removed@vaadin/vaadin-lumo-styles@24.0.0-alpha10(transitive)
- Removed@vaadin/vaadin-material-styles@24.0.0-alpha10(transitive)
- Removed@vaadin/vaadin-themable-mixin@24.0.0-alpha10(transitive)