@vaadin/vaadin-list-mixin
Advanced tools
Comparing version 2.0.0-pre.1 to 2.0.0-pre.2
@@ -13,3 +13,3 @@ { | ||
"name": "@vaadin/vaadin-list-mixin", | ||
"version": "2.0.0-pre.1", | ||
"version": "2.0.0-pre.2", | ||
"main": "vaadin-list-mixin.js", | ||
@@ -28,7 +28,6 @@ "author": "Vaadin Ltd", | ||
"dependencies": { | ||
"@polymer/polymer": "3.0.0-pre.12", | ||
"@vaadin/vaadin-themable-mixin": "^1.1.5-pre.1" | ||
"@polymer/polymer": "^3.0.0-pre.12" | ||
}, | ||
"devDependencies": { | ||
"@polymer/iron-test-helpers": "3.0.0-pre.12", | ||
"@polymer/iron-test-helpers": "^3.0.0-pre.12", | ||
"wct-browser-legacy": "0.0.1-pre.11", | ||
@@ -35,0 +34,0 @@ "@webcomponents/webcomponentsjs": "^1.0.0" |
@@ -1,8 +0,3 @@ | ||
import { FlattenedNodesObserver } from '../../@polymer/polymer/lib/utils/flattened-nodes-observer.js'; | ||
import { FlattenedNodesObserver } from '@polymer/polymer/lib/utils/flattened-nodes-observer.js'; | ||
/** | ||
* A mixin for `nav` elements, facilitating navigation and selection of childNodes. | ||
* | ||
* @polymerMixin | ||
*/ | ||
export const ListMixin = superClass => class VaadinListMixin extends superClass { | ||
@@ -38,3 +33,13 @@ static get properties() { | ||
/* The array of list items */ | ||
/** | ||
* The list of items from which a selection can be made. | ||
* Is is populated from the elements passed to the light DOM, | ||
* and updated dynamically when adding or removing items. | ||
* | ||
* The item elements must implement `Vaadin.ItemMixin`. | ||
* | ||
* Note: unlike `<vaadin-combo-box>`, this property is read-only, | ||
* so if you want to provide items by iterating array of data, | ||
* you have to use `dom-repeat` and place it to the light DOM. | ||
*/ | ||
items: { | ||
@@ -58,6 +63,3 @@ type: Array, | ||
this._observer = new FlattenedNodesObserver(this, info => { | ||
const items = (this.items || []) | ||
.filter(e => info.removedNodes.indexOf(e) < 0) | ||
.concat(this._filterItems(info.addedNodes)); | ||
this._setItems(items); | ||
this._setItems(this._filterItems(Array.from(this.children))); | ||
}); | ||
@@ -64,0 +66,0 @@ } |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34204
1
185
- Removed@polymer/polymer@3.0.0-pre.12(transitive)
- Removed@vaadin/vaadin-themable-mixin@1.6.2(transitive)
- Removed@webcomponents/webcomponentsjs@1.3.3(transitive)
- Removedlit-element@2.5.1(transitive)
- Removedlit-html@1.4.1(transitive)