Skip to content

Commit 282df4b

Browse files
authored
chore(ui5-multi-combobox): fix JS error on phone (#2795)
Fix JS error thrown on phone (Chrome phone emulator as well). It happens, because the selectedValues array is never declared, but accessed as "this.selectedValues.length" through the "_showAllItemsButtonPressed" getter upon initial rendering. To reproduce the issue you can use Chrome phone emulator and open https://sap.github.io/ui5-webcomponents/master/playground/main/pages/MultiComboBox/ on phone.
1 parent ab83ac9 commit 282df4b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/main/src/MultiComboBox.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ const metadata = {
8181
* @public
8282
* @since 1.0.0-rc.9
8383
*/
84-
icon: {
85-
type: HTMLElement,
86-
},
84+
icon: {
85+
type: HTMLElement,
86+
},
8787

8888
/**
8989
* Defines the value state message that will be displayed as pop up under the <code>ui5-multi-combobox</code>.
@@ -398,6 +398,7 @@ class MultiComboBox extends UI5Element {
398398
super();
399399

400400
this._filteredItems = [];
401+
this.selectedValues = [];
401402
this._inputLastValue = "";
402403
this._deleting = false;
403404
this._validationTimeout = null;

0 commit comments

Comments
 (0)