Skip to content

Commit

Permalink
fix(ui5-multi-combobox): adjust open property handling (#7763)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikoletavnv authored Nov 30, 2023
1 parent db65adb commit bb2ecfc
Showing 1 changed file with 24 additions and 14 deletions.
38 changes: 24 additions & 14 deletions packages/main/src/MultiComboBox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,19 +353,6 @@ class MultiComboBox extends UI5Element {
@property({ type: ComboBoxFilter, defaultValue: ComboBoxFilter.StartsWithPerTerm })
filter!: `${ComboBoxFilter}`;

/**
* Indicates whether the dropdown is open. True if the dropdown is open, false otherwise.
*
* @type {boolean}
* @name sap.ui.webc.main.MultiComboBox.prototype.open
* @defaultvalue false
* @readonly
* @since 1.0.0-rc.5
* @public
*/
@property({ type: Boolean })
open!: boolean;

/**
* Defines the accessible ARIA name of the component.
*
Expand All @@ -390,6 +377,16 @@ class MultiComboBox extends UI5Element {
@property()
accessibleNameRef!: string;

/**
* Indicates whether the dropdown is open. True if the dropdown is open, false otherwise.
*
* @type {boolean}
* @defaultvalue false
* @private
*/
@property({ type: Boolean })
_open!: boolean;

@property({ type: Object, noAttribute: true, multiple: true })
_filteredItems!: Array<IMultiComboBoxItem>;

Expand Down Expand Up @@ -545,6 +542,19 @@ class MultiComboBox extends UI5Element {
this.selectedItems = this.items.filter((item, idx, allItems) => MultiComboBox._groupItemFilter(item, ++idx, allItems, selectedItems) || selectedItems.indexOf(item) !== -1);
}

/**
* Indicates whether the dropdown is open. True if the dropdown is open, false otherwise.
*
* @type {boolean}
* @name sap.ui.webc.main.MultiComboBox.prototype.open
* @defaultvalue false
* @readonly
* @public
*/
get open() {
return this._open;
}

get _showAllItemsButtonPressed(): boolean {
return this.filterSelected;
}
Expand Down Expand Up @@ -1251,7 +1261,7 @@ class MultiComboBox extends UI5Element {
}

_toggle() {
this.open = !this.open;
this._open = !this._open;
this.fireEvent("open-change");
}

Expand Down

0 comments on commit bb2ecfc

Please sign in to comment.