@vaadin/multi-select-combo-box 24.5.4 → 24.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/multi-select-combo-box",
|
|
3
|
-
"version": "24.5.
|
|
3
|
+
"version": "24.5.6",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -38,20 +38,20 @@
|
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@polymer/polymer": "^3.0.0",
|
|
41
|
-
"@vaadin/a11y-base": "~24.5.
|
|
42
|
-
"@vaadin/combo-box": "~24.5.
|
|
43
|
-
"@vaadin/component-base": "~24.5.
|
|
44
|
-
"@vaadin/field-base": "~24.5.
|
|
45
|
-
"@vaadin/input-container": "~24.5.
|
|
46
|
-
"@vaadin/item": "~24.5.
|
|
47
|
-
"@vaadin/lit-renderer": "~24.5.
|
|
48
|
-
"@vaadin/overlay": "~24.5.
|
|
49
|
-
"@vaadin/vaadin-lumo-styles": "~24.5.
|
|
50
|
-
"@vaadin/vaadin-material-styles": "~24.5.
|
|
51
|
-
"@vaadin/vaadin-themable-mixin": "~24.5.
|
|
41
|
+
"@vaadin/a11y-base": "~24.5.6",
|
|
42
|
+
"@vaadin/combo-box": "~24.5.6",
|
|
43
|
+
"@vaadin/component-base": "~24.5.6",
|
|
44
|
+
"@vaadin/field-base": "~24.5.6",
|
|
45
|
+
"@vaadin/input-container": "~24.5.6",
|
|
46
|
+
"@vaadin/item": "~24.5.6",
|
|
47
|
+
"@vaadin/lit-renderer": "~24.5.6",
|
|
48
|
+
"@vaadin/overlay": "~24.5.6",
|
|
49
|
+
"@vaadin/vaadin-lumo-styles": "~24.5.6",
|
|
50
|
+
"@vaadin/vaadin-material-styles": "~24.5.6",
|
|
51
|
+
"@vaadin/vaadin-themable-mixin": "~24.5.6"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@vaadin/chai-plugins": "~24.5.
|
|
54
|
+
"@vaadin/chai-plugins": "~24.5.6",
|
|
55
55
|
"@vaadin/testing-helpers": "^1.0.0",
|
|
56
56
|
"lit": "^3.0.0",
|
|
57
57
|
"sinon": "^18.0.0"
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"web-types.json",
|
|
61
61
|
"web-types.lit.json"
|
|
62
62
|
],
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "2c20ec16149e8016e0733a80e349231da13660bc"
|
|
64
64
|
}
|
|
@@ -150,6 +150,12 @@ class MultiSelectComboBoxInternal extends ComboBoxDataProviderMixin(ComboBoxMixi
|
|
|
150
150
|
return 'vaadin-multi-select-combo-box';
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
+
constructor() {
|
|
154
|
+
super();
|
|
155
|
+
|
|
156
|
+
this.addEventListener('custom-value-set', this.__onCustomValueSet.bind(this));
|
|
157
|
+
}
|
|
158
|
+
|
|
153
159
|
/**
|
|
154
160
|
* Override method inherited from the combo-box
|
|
155
161
|
* to allow opening dropdown when readonly.
|
|
@@ -361,6 +367,19 @@ class MultiSelectComboBoxInternal extends ComboBoxDataProviderMixin(ComboBoxMixi
|
|
|
361
367
|
}
|
|
362
368
|
}
|
|
363
369
|
|
|
370
|
+
/**
|
|
371
|
+
* Override method inherited from the combo-box
|
|
372
|
+
* to not commit an already selected item again
|
|
373
|
+
* after closing overlay on outside click.
|
|
374
|
+
* @protected
|
|
375
|
+
* @override
|
|
376
|
+
*/
|
|
377
|
+
_onClosed() {
|
|
378
|
+
this._ignoreCommitValue = true;
|
|
379
|
+
|
|
380
|
+
super._onClosed();
|
|
381
|
+
}
|
|
382
|
+
|
|
364
383
|
/**
|
|
365
384
|
* Override method inherited from the combo-box
|
|
366
385
|
* to not commit an already selected item again
|
|
@@ -373,7 +392,7 @@ class MultiSelectComboBoxInternal extends ComboBoxDataProviderMixin(ComboBoxMixi
|
|
|
373
392
|
this._ignoreCommitValue = false;
|
|
374
393
|
|
|
375
394
|
// Reset internal combo-box state
|
|
376
|
-
this.
|
|
395
|
+
this.clear();
|
|
377
396
|
this._inputElementValue = '';
|
|
378
397
|
return;
|
|
379
398
|
}
|
|
@@ -442,6 +461,15 @@ class MultiSelectComboBoxInternal extends ComboBoxDataProviderMixin(ComboBoxMixi
|
|
|
442
461
|
|
|
443
462
|
super.clearCache();
|
|
444
463
|
}
|
|
464
|
+
|
|
465
|
+
/** @private */
|
|
466
|
+
__onCustomValueSet(event) {
|
|
467
|
+
// Prevent setting custom value on input blur or outside click,
|
|
468
|
+
// so it can be only committed explicitly by pressing Enter.
|
|
469
|
+
if (this._ignoreCommitValue) {
|
|
470
|
+
event.stopImmediatePropagation();
|
|
471
|
+
}
|
|
472
|
+
}
|
|
445
473
|
}
|
|
446
474
|
|
|
447
475
|
defineCustomElement(MultiSelectComboBoxInternal);
|
package/web-types.json
CHANGED