-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ui5-multi-combobox): introduce grouping functionality (#5250)
* feat(ui5-multi-combobox): introduce grouping functionality * feat(ui5-multi-combobox): resolve merge conflicts
- Loading branch information
Showing
6 changed files
with
432 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js"; | ||
import GroupHeaderListItem from "./GroupHeaderListItem.js"; | ||
|
||
/** | ||
* @public | ||
*/ | ||
const metadata = { | ||
tag: "ui5-mcb-group-item", | ||
properties: /** @lends sap.ui.webcomponents.main.MultiComboBoxGroupItem.prototype */ { | ||
/** | ||
* Defines the text of the component. | ||
* | ||
* @type {string} | ||
* @defaultvalue "" | ||
* @public | ||
*/ | ||
text: { | ||
type: String, | ||
}, | ||
}, | ||
slots: /** @lends sap.ui.webcomponents.main.MultiComboBoxGroupItem.prototype */ { | ||
}, | ||
events: /** @lends sap.ui.webcomponents.main.MultiComboBoxGroupItem.prototype */ { | ||
}, | ||
}; | ||
|
||
/** | ||
* @class | ||
* The <code>ui5-multi-combobox-group-item</code> is type of suggestion item, | ||
* that can be used to split the <code>ui5-multi-combobox</code> suggestions into groups. | ||
* | ||
* @constructor | ||
* @author SAP SE | ||
* @alias sap.ui.webcomponents.main.MultiComboBoxGroupItem | ||
* @extends UI5Element | ||
* @tagname ui5-mcb-group-item | ||
* @public | ||
* @implements sap.ui.webcomponents.main.IMultiComboBoxItem | ||
* @since 1.4.0 | ||
*/ | ||
class MultiComboBoxGroupItem extends UI5Element { | ||
static get metadata() { | ||
return metadata; | ||
} | ||
|
||
static get dependencies() { | ||
return [ | ||
GroupHeaderListItem, | ||
]; | ||
} | ||
|
||
/** | ||
* Used to avoid tag name checks | ||
* @protected | ||
*/ | ||
get isGroupItem() { | ||
return true; | ||
} | ||
|
||
get stableDomRef() { | ||
return this.getAttribute("stable-dom-ref") || `${this._id}-stable-dom-ref`; | ||
} | ||
} | ||
|
||
MultiComboBoxGroupItem.define(); | ||
|
||
export default MultiComboBoxGroupItem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.