Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/main/src/ListItem.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
aria-selected="{{ariaSelected}}"
role="{{_accInfo.role}}"
aria-expanded="{{_accInfo.ariaExpanded}}"
title="{{title}}"
aria-level="{{_accInfo.ariaLevel}}"
aria-posinset="{{_accInfo.posinset}}"
aria-setsize="{{_accInfo.setsize}}"
Expand Down
11 changes: 11 additions & 0 deletions packages/main/src/ListItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,17 @@ const metadata = {
type: Boolean,
},

/**
* Defines the tooltip of the component.
* @type {string}
* @defaultvalue ""
* @private
* @since 1.0.0-rc.15
*/
title: {
type: String,
},

/**
* Indicates if the list item is actionable, e.g has hover and pressed effects.
*
Expand Down
6 changes: 3 additions & 3 deletions packages/main/src/SuggestionListItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const metadata = {
type: HTMLElement,
},
"default": {
propertyName: "title",
propertyName: "titleText",
},
},
};
Expand Down Expand Up @@ -59,11 +59,11 @@ class SuggestionListItem extends StandardListItem {

onBeforeRendering(...params) {
super.onBeforeRendering(...params);
this.hasTitle = !!this.title.length;
this.hasTitle = !!this.titleText.length;
}

get effectiveTitle() {
return this.title.filter(node => node.nodeType !== Node.COMMENT_NODE).map(el => el.textContent).join("");
return this.titleText.filter(node => node.nodeType !== Node.COMMENT_NODE).map(el => el.textContent).join("");
}

get hasDescription() {
Expand Down
1 change: 1 addition & 0 deletions packages/main/src/Tree.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
icon="{{this.treeItem.icon}}"
additional-text="{{this.treeItem.additionalText}}"
additional-text-state="{{this.treeItem.additionalTextState}}"
title="{{this.treeItem.title}}"
?_toggle-button-end="{{ ../_toggleButtonEnd}}"
?_minimal="{{../_minimal}}"
.treeItem="{{this.treeItem}}"
Expand Down
11 changes: 11 additions & 0 deletions packages/main/src/TreeItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,17 @@ const metadata = {
type: ValueState,
defaultValue: ValueState.None,
},

/**
* Defines the tooltip of the component.
* @type {string}
* @defaultvalue ""
* @private
* @since 1.0.0-rc.15
*/
title: {
type: String,
},
},
managedSlots: true,
slots: /** @lends sap.ui.webcomponents.main.TreeItem.prototype */ {
Expand Down