@vaadin/vaadin-select
Advanced tools
Comparing version 2.1.0-alpha1 to 2.1.0
@@ -13,3 +13,3 @@ { | ||
"name": "@vaadin/vaadin-select", | ||
"version": "2.1.0-alpha1", | ||
"version": "2.1.0", | ||
"main": "vaadin-select.js", | ||
@@ -16,0 +16,0 @@ "author": "Vaadin Ltd", |
@@ -32,13 +32,21 @@ [![npm version](https://badgen.net/npm/v/@vaadin/vaadin-select)](https://www.npmjs.com/package/@vaadin/vaadin-select) | ||
```html | ||
<vaadin-select label="Label" placeholder="Placeholder" value="Option one"> | ||
<template> | ||
<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> | ||
</template> | ||
</vaadin-select> | ||
<vaadin-select></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) { | ||
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); | ||
}; | ||
</script> | ||
``` | ||
@@ -128,3 +136,3 @@ | ||
We are using [ESLint](http://eslint.org/) for linting JavaScript code. You can check if your code is following our standards by running `gulp lint`, which will automatically lint all `.js` files as well as JavaScript snippets inside `.html` files. | ||
We are using [ESLint](http://eslint.org/) for linting JavaScript code. You can check if your code is following our standards by running `npm run lint`, which will automatically lint all `.js` files as well as JavaScript snippets inside `.html` files. | ||
@@ -131,0 +139,0 @@ |
@@ -182,3 +182,3 @@ /** | ||
static get version() { | ||
return '2.1.0-alpha1'; | ||
return '2.1.0'; | ||
} | ||
@@ -185,0 +185,0 @@ |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
46720
0
153
0