@vaadin/vaadin-select
Advanced tools
Comparing version 2.1.5 to 2.1.6
@@ -13,3 +13,3 @@ { | ||
"name": "@vaadin/vaadin-select", | ||
"version": "2.1.5", | ||
"version": "2.1.6", | ||
"main": "vaadin-select.js", | ||
@@ -55,4 +55,5 @@ "author": "Vaadin Ltd", | ||
"@vaadin/vaadin-demo-helpers": "^3.0.0", | ||
"@vaadin/vaadin-button": "^2.1.0" | ||
"@vaadin/vaadin-button": "^2.1.0", | ||
"@vaadin/vaadin-icons": "^4.3.1" | ||
} | ||
} |
@@ -34,17 +34,18 @@ [![npm version](https://badgen.net/npm/v/@vaadin/vaadin-select)](https://www.npmjs.com/package/@vaadin/vaadin-select) | ||
<script> | ||
document.querySelector('vaadin-select').renderer = function(root) { | ||
// Check if there is a list-box generated with the previous renderer call to update its content instead of recreation | ||
if (root.firstChild) { | ||
document.querySelector('vaadin-select').renderer = root => { | ||
if (root.firstElementChild) { | ||
return; | ||
} | ||
// create the <vaadin-list-box> | ||
const listBox = document.createElement('vaadin-list-box'); | ||
// append 3 <vaadin-item> elements | ||
['Jose', 'Manolo', 'Pedro'].forEach(function(name) { | ||
const item = document.createElement('vaadin-item'); | ||
item.textContent = name; | ||
listBox.appendChild(item); | ||
}); | ||
// update the content | ||
root.appendChild(listBox); | ||
// Note that innerHTML is only used for demo purposes here! | ||
// Prefer using a templating library instead. | ||
root.innerHTML = ` | ||
<vaadin-list-box> | ||
<vaadin-item>Option one</vaadin-item> | ||
<vaadin-item>Option two</vaadin-item> | ||
<vaadin-item>Option three</vaadin-item> | ||
<hr> | ||
<vaadin-item disabled>Option four</vaadin-item> | ||
</vaadin-list-box> | ||
`; | ||
}; | ||
@@ -51,0 +52,0 @@ </script> |
@@ -34,3 +34,2 @@ /** | ||
* @memberof Vaadin | ||
* @extends Vaadin.OverlayElement | ||
*/ | ||
@@ -37,0 +36,0 @@ class SelectOverlayElement extends OverlayElement { |
@@ -20,3 +20,2 @@ /** | ||
* @memberof Vaadin | ||
* @extends Vaadin.TextFieldElement | ||
*/ | ||
@@ -23,0 +22,0 @@ class SelectTextFieldElement extends TextFieldElement { |
@@ -182,3 +182,3 @@ /** | ||
static get version() { | ||
return '2.1.5'; | ||
return '2.1.6'; | ||
} | ||
@@ -559,2 +559,3 @@ | ||
labelItem.removeAttribute('tabindex'); | ||
labelItem.removeAttribute('role'); | ||
@@ -561,0 +562,0 @@ this._valueElement.appendChild(labelItem); |
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
154
47921
9
822