@vaadin/grid
Advanced tools
Comparing version 23.1.0-beta2 to 23.1.0-beta3
{ | ||
"name": "@vaadin/grid", | ||
"version": "23.1.0-beta2", | ||
"version": "23.1.0-beta3", | ||
"publishConfig": { | ||
@@ -46,13 +46,13 @@ "access": "public" | ||
"@polymer/polymer": "^3.0.0", | ||
"@vaadin/checkbox": "23.1.0-beta2", | ||
"@vaadin/component-base": "23.1.0-beta2", | ||
"@vaadin/lit-renderer": "23.1.0-beta2", | ||
"@vaadin/text-field": "23.1.0-beta2", | ||
"@vaadin/vaadin-lumo-styles": "23.1.0-beta2", | ||
"@vaadin/vaadin-material-styles": "23.1.0-beta2", | ||
"@vaadin/vaadin-themable-mixin": "23.1.0-beta2" | ||
"@vaadin/checkbox": "23.1.0-beta3", | ||
"@vaadin/component-base": "23.1.0-beta3", | ||
"@vaadin/lit-renderer": "23.1.0-beta3", | ||
"@vaadin/text-field": "23.1.0-beta3", | ||
"@vaadin/vaadin-lumo-styles": "23.1.0-beta3", | ||
"@vaadin/vaadin-material-styles": "23.1.0-beta3", | ||
"@vaadin/vaadin-themable-mixin": "23.1.0-beta3" | ||
}, | ||
"devDependencies": { | ||
"@esm-bundle/chai": "^4.3.4", | ||
"@vaadin/polymer-legacy-adapter": "23.1.0-beta2", | ||
"@vaadin/polymer-legacy-adapter": "23.1.0-beta3", | ||
"@vaadin/testing-helpers": "^0.3.2", | ||
@@ -62,3 +62,3 @@ "lit": "^2.0.0", | ||
}, | ||
"gitHead": "f11f9245a0b5e6bf912725a501c27c24b74e7c8d" | ||
"gitHead": "c787ceb8a312f88631c6d429ff320d5f89b1b838" | ||
} |
@@ -8,4 +8,4 @@ /** | ||
import { directive } from 'lit/directive.js'; | ||
import { microTask } from '@vaadin/component-base/src/async'; | ||
import { Debouncer } from '@vaadin/component-base/src/debounce'; | ||
import { microTask } from '@vaadin/component-base/src/async.js'; | ||
import { Debouncer } from '@vaadin/component-base/src/debounce.js'; | ||
import { LitRendererDirective } from '@vaadin/lit-renderer'; | ||
@@ -12,0 +12,0 @@ import { CONTENT_UPDATE_DEBOUNCER } from './renderer-directives.js'; |
@@ -23,2 +23,11 @@ /** | ||
}, | ||
/** | ||
* Set of selected item ids | ||
* @private | ||
*/ | ||
__selectedKeys: { | ||
type: Object, | ||
value: () => new Set(), | ||
}, | ||
}; | ||
@@ -28,3 +37,3 @@ } | ||
static get observers() { | ||
return ['_selectedItemsChanged(selectedItems.*)']; | ||
return ['_updateSelectedKeys(itemIdPath, selectedItems.*)']; | ||
} | ||
@@ -38,3 +47,3 @@ | ||
_isSelected(item) { | ||
return this.selectedItems && this._getItemIndexInArray(item, this.selectedItems) > -1; | ||
return this.__selectedKeys.has(this.getItemId(item)); | ||
} | ||
@@ -74,4 +83,3 @@ | ||
_toggleItem(item) { | ||
const index = this._getItemIndexInArray(item, this.selectedItems); | ||
if (index === -1) { | ||
if (!this._isSelected(item)) { | ||
this.selectItem(item); | ||
@@ -84,3 +92,9 @@ } else { | ||
/** @private */ | ||
_selectedItemsChanged() { | ||
_updateSelectedKeys() { | ||
const selectedItems = this.selectedItems || []; | ||
this.__selectedKeys = new Set(); | ||
selectedItems.forEach((item) => { | ||
this.__selectedKeys.add(this.getItemId(item)); | ||
}); | ||
this.requestContentUpdate(); | ||
@@ -87,0 +101,0 @@ } |
355628
9601
+ Added@vaadin/checkbox@23.1.0-beta3(transitive)
+ Added@vaadin/component-base@23.1.0-beta3(transitive)
+ Added@vaadin/field-base@23.1.0-beta3(transitive)
+ Added@vaadin/icon@23.1.0-beta3(transitive)
+ Added@vaadin/input-container@23.1.0-beta3(transitive)
+ Added@vaadin/lit-renderer@23.1.0-beta3(transitive)
+ Added@vaadin/text-field@23.1.0-beta3(transitive)
+ Added@vaadin/vaadin-lumo-styles@23.1.0-beta3(transitive)
+ Added@vaadin/vaadin-material-styles@23.1.0-beta3(transitive)
+ Added@vaadin/vaadin-themable-mixin@23.1.0-beta3(transitive)
- Removed@vaadin/checkbox@23.1.0-beta2(transitive)
- Removed@vaadin/component-base@23.1.0-beta2(transitive)
- Removed@vaadin/field-base@23.1.0-beta2(transitive)
- Removed@vaadin/icon@23.1.0-beta2(transitive)
- Removed@vaadin/input-container@23.1.0-beta2(transitive)
- Removed@vaadin/lit-renderer@23.1.0-beta2(transitive)
- Removed@vaadin/text-field@23.1.0-beta2(transitive)
- Removed@vaadin/vaadin-lumo-styles@23.1.0-beta2(transitive)
- Removed@vaadin/vaadin-material-styles@23.1.0-beta2(transitive)
- Removed@vaadin/vaadin-themable-mixin@23.1.0-beta2(transitive)