@vaadin/multi-select-combo-box 24.2.0-alpha10 → 24.2.0-alpha12
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.2.0-
|
|
3
|
+
"version": "24.2.0-alpha12",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -37,17 +37,17 @@
|
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@polymer/polymer": "^3.0.0",
|
|
40
|
-
"@vaadin/a11y-base": "24.2.0-
|
|
41
|
-
"@vaadin/combo-box": "24.2.0-
|
|
42
|
-
"@vaadin/component-base": "24.2.0-
|
|
43
|
-
"@vaadin/field-base": "24.2.0-
|
|
44
|
-
"@vaadin/input-container": "24.2.0-
|
|
45
|
-
"@vaadin/item": "24.2.0-
|
|
46
|
-
"@vaadin/lit-renderer": "24.2.0-
|
|
47
|
-
"@vaadin/overlay": "24.2.0-
|
|
48
|
-
"@vaadin/vaadin-lumo-styles": "24.2.0-
|
|
49
|
-
"@vaadin/vaadin-material-styles": "24.2.0-
|
|
50
|
-
"@vaadin/vaadin-themable-mixin": "24.2.0-
|
|
40
|
+
"@vaadin/a11y-base": "24.2.0-alpha12",
|
|
41
|
+
"@vaadin/combo-box": "24.2.0-alpha12",
|
|
42
|
+
"@vaadin/component-base": "24.2.0-alpha12",
|
|
43
|
+
"@vaadin/field-base": "24.2.0-alpha12",
|
|
44
|
+
"@vaadin/input-container": "24.2.0-alpha12",
|
|
45
|
+
"@vaadin/item": "24.2.0-alpha12",
|
|
46
|
+
"@vaadin/lit-renderer": "24.2.0-alpha12",
|
|
47
|
+
"@vaadin/overlay": "24.2.0-alpha12",
|
|
48
|
+
"@vaadin/vaadin-lumo-styles": "24.2.0-alpha12",
|
|
49
|
+
"@vaadin/vaadin-material-styles": "24.2.0-alpha12",
|
|
50
|
+
"@vaadin/vaadin-themable-mixin": "24.2.0-alpha12"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@esm-bundle/chai": "^4.3.4",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"web-types.json",
|
|
60
60
|
"web-types.lit.json"
|
|
61
61
|
],
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "854d2809340ef73f765350808bb92ed5c840d147"
|
|
63
63
|
}
|
|
@@ -160,33 +160,44 @@ class MultiSelectComboBoxInternal extends ComboBoxDataProviderMixin(ComboBoxMixi
|
|
|
160
160
|
* @override
|
|
161
161
|
*/
|
|
162
162
|
_onEnter(event) {
|
|
163
|
-
this.
|
|
163
|
+
if (this.opened) {
|
|
164
|
+
// Do not submit the surrounding form.
|
|
165
|
+
event.preventDefault();
|
|
166
|
+
// Do not trigger global listeners.
|
|
167
|
+
event.stopPropagation();
|
|
168
|
+
|
|
169
|
+
if (this.readonly) {
|
|
170
|
+
this.close();
|
|
171
|
+
} else {
|
|
172
|
+
// Keep selected item focused after committing on Enter.
|
|
173
|
+
const focusedItem = this.filteredItems[this._focusedIndex];
|
|
174
|
+
this._commitValue();
|
|
175
|
+
this._focusedIndex = this.filteredItems.indexOf(focusedItem);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
164
180
|
|
|
165
181
|
super._onEnter(event);
|
|
166
182
|
}
|
|
167
183
|
|
|
168
184
|
/**
|
|
185
|
+
* Override Escape handler to not clear
|
|
186
|
+
* selected items when readonly.
|
|
187
|
+
* @param {!Event} event
|
|
169
188
|
* @protected
|
|
170
189
|
* @override
|
|
171
190
|
*/
|
|
172
|
-
|
|
191
|
+
_onEscape(event) {
|
|
173
192
|
if (this.readonly) {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
if (this.__enterPressed) {
|
|
179
|
-
this.__enterPressed = null;
|
|
180
|
-
|
|
181
|
-
// Keep selected item focused after committing on Enter.
|
|
182
|
-
const focusedItem = this.filteredItems[this._focusedIndex];
|
|
183
|
-
this._commitValue();
|
|
184
|
-
this._focusedIndex = this.filteredItems.indexOf(focusedItem);
|
|
185
|
-
|
|
193
|
+
event.stopPropagation();
|
|
194
|
+
if (this.opened) {
|
|
195
|
+
this.close();
|
|
196
|
+
}
|
|
186
197
|
return;
|
|
187
198
|
}
|
|
188
199
|
|
|
189
|
-
super.
|
|
200
|
+
super._onEscape(event);
|
|
190
201
|
}
|
|
191
202
|
|
|
192
203
|
/**
|
|
@@ -16,13 +16,13 @@ import type { ControllerMixinClass } from '@vaadin/component-base/src/controller
|
|
|
16
16
|
import type { DelegateStateMixinClass } from '@vaadin/component-base/src/delegate-state-mixin.js';
|
|
17
17
|
import type { ElementMixinClass } from '@vaadin/component-base/src/element-mixin.js';
|
|
18
18
|
import type { ResizeMixinClass } from '@vaadin/component-base/src/resize-mixin.js';
|
|
19
|
+
import type { SlotStylesMixinClass } from '@vaadin/component-base/src/slot-styles-mixin.js';
|
|
19
20
|
import type { ClearButtonMixinClass } from '@vaadin/field-base/src/clear-button-mixin.js';
|
|
20
21
|
import type { FieldMixinClass } from '@vaadin/field-base/src/field-mixin.js';
|
|
21
22
|
import type { InputConstraintsMixinClass } from '@vaadin/field-base/src/input-constraints-mixin.js';
|
|
22
23
|
import type { InputControlMixinClass } from '@vaadin/field-base/src/input-control-mixin.js';
|
|
23
24
|
import type { InputMixinClass } from '@vaadin/field-base/src/input-mixin.js';
|
|
24
25
|
import type { LabelMixinClass } from '@vaadin/field-base/src/label-mixin.js';
|
|
25
|
-
import type { SlotStylesMixinClass } from '@vaadin/field-base/src/slot-styles-mixin.js';
|
|
26
26
|
import type { ValidateMixinClass } from '@vaadin/field-base/src/validate-mixin.js';
|
|
27
27
|
import type { ThemableMixinClass } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
28
28
|
import type { ThemePropertyMixinClass } from '@vaadin/vaadin-themable-mixin/vaadin-theme-property-mixin.js';
|
package/web-types.json
CHANGED
package/web-types.lit.json
CHANGED