Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vaadin/multi-select-combo-box

Package Overview
Dependencies
Maintainers
14
Versions
331
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vaadin/multi-select-combo-box - npm Package Compare versions

Comparing version 23.2.0-alpha2 to 23.2.0-alpha3

20

package.json
{
"name": "@vaadin/multi-select-combo-box",
"version": "23.2.0-alpha2",
"version": "23.2.0-alpha3",
"publishConfig": {

@@ -38,10 +38,10 @@ "access": "public"

"@polymer/polymer": "^3.0.0",
"@vaadin/combo-box": "23.2.0-alpha2",
"@vaadin/component-base": "23.2.0-alpha2",
"@vaadin/field-base": "23.2.0-alpha2",
"@vaadin/input-container": "23.2.0-alpha2",
"@vaadin/lit-renderer": "23.2.0-alpha2",
"@vaadin/vaadin-lumo-styles": "23.2.0-alpha2",
"@vaadin/vaadin-material-styles": "23.2.0-alpha2",
"@vaadin/vaadin-themable-mixin": "23.2.0-alpha2"
"@vaadin/combo-box": "23.2.0-alpha3",
"@vaadin/component-base": "23.2.0-alpha3",
"@vaadin/field-base": "23.2.0-alpha3",
"@vaadin/input-container": "23.2.0-alpha3",
"@vaadin/lit-renderer": "23.2.0-alpha3",
"@vaadin/vaadin-lumo-styles": "23.2.0-alpha3",
"@vaadin/vaadin-material-styles": "23.2.0-alpha3",
"@vaadin/vaadin-themable-mixin": "23.2.0-alpha3"
},

@@ -53,3 +53,3 @@ "devDependencies": {

},
"gitHead": "c9b8113d0fa9a602f8b9cb915c1826355af2e8df"
"gitHead": "06e5875be93ca50da2846dafc65a8531010c0576"
}

@@ -6,7 +6,7 @@ /**

*/
import { TemplateResult } from 'lit';
import { DirectiveResult } from 'lit/directive.js';
import { ComboBoxItemModel } from '@vaadin/combo-box/src/vaadin-combo-box.js';
import type { TemplateResult } from 'lit';
import type { DirectiveResult } from 'lit/directive.js';
import type { ComboBoxItemModel } from '@vaadin/combo-box/src/vaadin-combo-box.js';
import { LitRendererDirective } from '@vaadin/lit-renderer';
import { MultiSelectComboBox } from '../vaadin-multi-select-combo-box.js';
import type { MultiSelectComboBox } from '../vaadin-multi-select-combo-box.js';

@@ -13,0 +13,0 @@ export type MultiSelectComboBoxLitRenderer<TItem> = (

@@ -90,2 +90,11 @@ /**

/**
* Last input value entered by the user before value is updated.
* Used to store `filter` property value before clearing it.
*/
lastFilter: {
type: String,
notify: true,
},
_target: {

@@ -200,2 +209,14 @@ type: Object,

/**
* @protected
* @override
*/
_commitValue() {
// Store filter value for checking if user input is matching
// an item which is already selected, to not un-select it.
this.lastFilter = this.filter;
super._commitValue();
}
/**
* Override method inherited from the combo-box

@@ -202,0 +223,0 @@ * to not update focused item when readonly.

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

*/
import {
import type {
ComboBoxDataProvider,

@@ -12,17 +12,17 @@ ComboBoxDefaultItem,

} from '@vaadin/combo-box/src/vaadin-combo-box.js';
import { ControllerMixinClass } from '@vaadin/component-base/src/controller-mixin.js';
import { DisabledMixinClass } from '@vaadin/component-base/src/disabled-mixin.js';
import { ElementMixinClass } from '@vaadin/component-base/src/element-mixin.js';
import { FocusMixinClass } from '@vaadin/component-base/src/focus-mixin.js';
import { KeyboardMixinClass } from '@vaadin/component-base/src/keyboard-mixin.js';
import { ResizeMixinClass } from '@vaadin/component-base/src/resize-mixin.js';
import { DelegateFocusMixinClass } from '@vaadin/field-base/src/delegate-focus-mixin.js';
import { DelegateStateMixinClass } from '@vaadin/field-base/src/delegate-state-mixin.js';
import { FieldMixinClass } from '@vaadin/field-base/src/field-mixin.js';
import { InputConstraintsMixinClass } from '@vaadin/field-base/src/input-constraints-mixin.js';
import { InputControlMixinClass } from '@vaadin/field-base/src/input-control-mixin.js';
import { InputMixinClass } from '@vaadin/field-base/src/input-mixin.js';
import { LabelMixinClass } from '@vaadin/field-base/src/label-mixin.js';
import { ValidateMixinClass } from '@vaadin/field-base/src/validate-mixin.js';
import { ThemableMixinClass } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
import type { ControllerMixinClass } from '@vaadin/component-base/src/controller-mixin.js';
import type { DisabledMixinClass } from '@vaadin/component-base/src/disabled-mixin.js';
import type { ElementMixinClass } from '@vaadin/component-base/src/element-mixin.js';
import type { FocusMixinClass } from '@vaadin/component-base/src/focus-mixin.js';
import type { KeyboardMixinClass } from '@vaadin/component-base/src/keyboard-mixin.js';
import type { ResizeMixinClass } from '@vaadin/component-base/src/resize-mixin.js';
import type { DelegateFocusMixinClass } from '@vaadin/field-base/src/delegate-focus-mixin.js';
import type { DelegateStateMixinClass } from '@vaadin/field-base/src/delegate-state-mixin.js';
import type { FieldMixinClass } from '@vaadin/field-base/src/field-mixin.js';
import type { InputConstraintsMixinClass } from '@vaadin/field-base/src/input-constraints-mixin.js';
import type { InputControlMixinClass } from '@vaadin/field-base/src/input-control-mixin.js';
import type { InputMixinClass } from '@vaadin/field-base/src/input-mixin.js';
import type { LabelMixinClass } from '@vaadin/field-base/src/label-mixin.js';
import type { ValidateMixinClass } from '@vaadin/field-base/src/validate-mixin.js';
import type { ThemableMixinClass } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';

@@ -70,2 +70,7 @@ export type MultiSelectComboBoxRenderer<TItem> = (

/**
* Fired whenever the field is validated.
*/
export type MultiSelectComboBoxValidatedEvent = CustomEvent<{ valid: boolean }>;
export interface MultiSelectComboBoxEventMap<TItem> extends HTMLElementEventMap {

@@ -81,2 +86,4 @@ change: MultiSelectComboBoxChangeEvent<TItem>;

'selected-items-changed': MultiSelectComboBoxSelectedItemsChangedEvent<TItem>;
validated: MultiSelectComboBoxValidatedEvent;
}

@@ -138,2 +145,3 @@

* `--vaadin-field-default-width` | Default width of the field | `12em`
* `--vaadin-multi-select-combo-box-overlay-width` | Width of the overlay | `auto`
* `--vaadin-multi-select-combo-box-overlay-max-height` | Max height of the overlay | `65vh`

@@ -161,2 +169,3 @@ * `--vaadin-multi-select-combo-box-input-min-width` | Min width of the input | `4em`

* @fires {CustomEvent} selected-items-changed - Fired when the `selectedItems` property changes.
* @fires {CustomEvent} validated - Fired whenever the field is validated.
*/

@@ -163,0 +172,0 @@ declare class MultiSelectComboBox<TItem = ComboBoxDefaultItem> extends HTMLElement {

@@ -112,2 +112,3 @@ /**

* `--vaadin-field-default-width` | Default width of the field | `12em`
* `--vaadin-multi-select-combo-box-overlay-width` | Width of the overlay | `auto`
* `--vaadin-multi-select-combo-box-overlay-max-height` | Max height of the overlay | `65vh`

@@ -135,2 +136,3 @@ * `--vaadin-multi-select-combo-box-input-min-width` | Min width of the input | `4em`

* @fires {CustomEvent} selected-items-changed - Fired when the `selectedItems` property changes.
* @fires {CustomEvent} validated - Fired whenever the field is validated.
*

@@ -168,2 +170,3 @@ * @extends HTMLElement

filter="{{filter}}"
last-filter="{{_lastFilter}}"
loading="{{loading}}"

@@ -459,2 +462,7 @@ size="{{size}}"

},
/** @private */
_lastFilter: {
type: String,
},
};

@@ -762,3 +770,4 @@ }

this.__updateSelection(itemsCopy);
this.__announceItem(item, false, itemsCopy.length);
const itemLabel = this._getItemLabel(item);
this.__announceItem(itemLabel, false, itemsCopy.length);
}

@@ -776,4 +785,5 @@

if (index !== -1) {
const lastFilter = this._lastFilter;
// Do not unselect when manually typing and committing an already selected item.
if (this.filter.toLowerCase() === itemLabel.toLowerCase()) {
if (lastFilter && lastFilter.toLowerCase() === itemLabel.toLowerCase()) {
this.__clearFilter();

@@ -780,0 +790,0 @@ return;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc