New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

multiselect-combo-box

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

multiselect-combo-box - npm Package Compare versions

Comparing version

to
2.0.3-alpha

2

package.json

@@ -15,3 +15,3 @@ {

"name": "multiselect-combo-box",
"version": "2.0.2",
"version": "2.0.3-alpha",
"main": "multiselect-combo-box.js",

@@ -18,0 +18,0 @@ "directories": {

@@ -13,3 +13,3 @@ [![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/gatanaso/multiselect-combo-box)

#### [Live Demo ↗](https://multiselect-combo-box.firebaseapp.com/demo/) | [Material Theme Live Demo ↗](https://multiselect-combo-box.firebaseapp.com/demo/material)
#### [Live Demo ↗](https://multiselect-combo-box.web.app/demo/) | [Material Theme Live Demo ↗](https://multiselect-combo-box.web.app/demo/material)

@@ -61,6 +61,6 @@ ## Getting started

* `master` the Polymer 2.x. version of the `multiselect-combo-box`
* `polymer-3` the Polymer 3 version of the `multiselect-combo-box`
* `master` the latest (Polymer 3) version of the `multiselect-combo-box`
* `polymer-2` the Polymer 2.x version of the `multiselect-combo-box`
## Java API
The Vaadin Flow Java compatible version of this component is available on the [Vaadin Directory](https://vaadin.com/directory/component/multiselect-combo-box) and [GitHub](https://github.com/gatanaso/multiselect-combo-box-flow).

@@ -92,3 +92,2 @@ import {PolymerElement} from '@polymer/polymer/polymer-element.js';

hidden\$="[[readonly]]"
items="[[items]]"
item-id-path="[[itemIdPath]]"

@@ -98,3 +97,4 @@ item-label-path="[[itemLabelPath]]"

on-change="_comboBoxValueChanged"
disabled="[[disabled]]">
disabled="[[disabled]]"
pageSize="[[pageSize]]">

@@ -187,2 +187,11 @@ <multiselect-combo-box-input

/**
* Number of items fetched at a time from the dataprovider. This property is delegated to the underlying `vaadin-combo-box`.
*/
pageSize: {
type: Number,
value: 50,
observer: '_pageSizeObserver'
},
/**
* The `readonly` attribute.

@@ -223,3 +232,6 @@ */

static get observers() {
return ['_selectedItemsObserver(selectedItems, selectedItems.*)'];
return [
'_selectedItemsObserver(selectedItems, selectedItems.*)',
'_itemsObserver(items, items.*)'
];
}

@@ -250,2 +262,10 @@

_itemsObserver(items) {
this.$.comboBox.items = items;
}
_dispatchChangeEvent() {
this.dispatchEvent(new CustomEvent('change', {bubbles: true}));
}
_comboBoxValueChanged() {

@@ -267,3 +287,5 @@ const item = this.$.comboBox.selectedItem;

this.$.comboBox.value = '';
this.validate();
if (this.validate()) {
this._dispatchChangeEvent();
}
}

@@ -293,3 +315,5 @@

this.selectedItems = update;
this.validate();
if (this.validate()) {
this._dispatchChangeEvent();
}
}

@@ -299,3 +323,5 @@

this.set('selectedItems', []);
this.validate();
if (this.validate()) {
this._dispatchChangeEvent();
}
}

@@ -378,2 +404,10 @@

}
_pageSizeObserver(pageSize, oldPageSize) {
if (Math.floor(pageSize) !== pageSize || pageSize <= 0) {
this.pageSize = oldPageSize;
throw new Error('`pageSize` value must be an integer > 0');
}
this.$.comboBox.pageSize = pageSize;
}
}

@@ -380,0 +414,0 @@

@@ -60,2 +60,3 @@ import '@vaadin/vaadin-lumo-styles/typography.js';

box-sizing: border-box;
min-width: 0;
}

@@ -73,2 +74,3 @@

font-weight: 500;
overflow: hidden;
}

@@ -75,0 +77,0 @@