@vaadin/multi-select-combo-box 24.6.0-rc1 → 24.7.0-alpha1
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.
|
|
3
|
+
"version": "24.7.0-alpha1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -39,21 +39,21 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
41
41
|
"@polymer/polymer": "^3.0.0",
|
|
42
|
-
"@vaadin/a11y-base": "24.
|
|
43
|
-
"@vaadin/combo-box": "24.
|
|
44
|
-
"@vaadin/component-base": "24.
|
|
45
|
-
"@vaadin/field-base": "24.
|
|
46
|
-
"@vaadin/input-container": "24.
|
|
47
|
-
"@vaadin/item": "24.
|
|
48
|
-
"@vaadin/lit-renderer": "24.
|
|
49
|
-
"@vaadin/overlay": "24.
|
|
50
|
-
"@vaadin/vaadin-lumo-styles": "24.
|
|
51
|
-
"@vaadin/vaadin-material-styles": "24.
|
|
52
|
-
"@vaadin/vaadin-themable-mixin": "24.
|
|
42
|
+
"@vaadin/a11y-base": "24.7.0-alpha1",
|
|
43
|
+
"@vaadin/combo-box": "24.7.0-alpha1",
|
|
44
|
+
"@vaadin/component-base": "24.7.0-alpha1",
|
|
45
|
+
"@vaadin/field-base": "24.7.0-alpha1",
|
|
46
|
+
"@vaadin/input-container": "24.7.0-alpha1",
|
|
47
|
+
"@vaadin/item": "24.7.0-alpha1",
|
|
48
|
+
"@vaadin/lit-renderer": "24.7.0-alpha1",
|
|
49
|
+
"@vaadin/overlay": "24.7.0-alpha1",
|
|
50
|
+
"@vaadin/vaadin-lumo-styles": "24.7.0-alpha1",
|
|
51
|
+
"@vaadin/vaadin-material-styles": "24.7.0-alpha1",
|
|
52
|
+
"@vaadin/vaadin-themable-mixin": "24.7.0-alpha1",
|
|
53
53
|
"lit": "^3.0.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@vaadin/chai-plugins": "24.
|
|
56
|
+
"@vaadin/chai-plugins": "24.7.0-alpha1",
|
|
57
57
|
"@vaadin/testing-helpers": "^1.0.0",
|
|
58
58
|
"sinon": "^18.0.0"
|
|
59
59
|
},
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"web-types.json",
|
|
62
62
|
"web-types.lit.json"
|
|
63
63
|
],
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "04be941c9a7b659871c97f31b9cc3ffd7528087b"
|
|
65
65
|
}
|
|
@@ -121,6 +121,12 @@ export const MultiSelectComboBoxInternalMixin = (superClass) =>
|
|
|
121
121
|
return 'vaadin-multi-select-combo-box';
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
+
constructor() {
|
|
125
|
+
super();
|
|
126
|
+
|
|
127
|
+
this.addEventListener('custom-value-set', this.__onCustomValueSet.bind(this));
|
|
128
|
+
}
|
|
129
|
+
|
|
124
130
|
/**
|
|
125
131
|
* Override method inherited from the combo-box
|
|
126
132
|
* to allow opening dropdown when readonly.
|
|
@@ -341,6 +347,19 @@ export const MultiSelectComboBoxInternalMixin = (superClass) =>
|
|
|
341
347
|
}
|
|
342
348
|
}
|
|
343
349
|
|
|
350
|
+
/**
|
|
351
|
+
* Override method inherited from the combo-box
|
|
352
|
+
* to not commit an already selected item again
|
|
353
|
+
* after closing overlay on outside click.
|
|
354
|
+
* @protected
|
|
355
|
+
* @override
|
|
356
|
+
*/
|
|
357
|
+
_onClosed() {
|
|
358
|
+
this._ignoreCommitValue = true;
|
|
359
|
+
|
|
360
|
+
super._onClosed();
|
|
361
|
+
}
|
|
362
|
+
|
|
344
363
|
/**
|
|
345
364
|
* Override method inherited from the combo-box
|
|
346
365
|
* to not commit an already selected item again
|
|
@@ -353,7 +372,7 @@ export const MultiSelectComboBoxInternalMixin = (superClass) =>
|
|
|
353
372
|
this._ignoreCommitValue = false;
|
|
354
373
|
|
|
355
374
|
// Reset internal combo-box state
|
|
356
|
-
this.
|
|
375
|
+
this.clear();
|
|
357
376
|
this._inputElementValue = '';
|
|
358
377
|
return;
|
|
359
378
|
}
|
|
@@ -422,4 +441,13 @@ export const MultiSelectComboBoxInternalMixin = (superClass) =>
|
|
|
422
441
|
|
|
423
442
|
super.clearCache();
|
|
424
443
|
}
|
|
444
|
+
|
|
445
|
+
/** @private */
|
|
446
|
+
__onCustomValueSet(event) {
|
|
447
|
+
// Prevent setting custom value on input blur or outside click,
|
|
448
|
+
// so it can be only committed explicitly by pressing Enter.
|
|
449
|
+
if (this._ignoreCommitValue) {
|
|
450
|
+
event.stopImmediatePropagation();
|
|
451
|
+
}
|
|
452
|
+
}
|
|
425
453
|
};
|
package/web-types.json
CHANGED
package/web-types.lit.json
CHANGED