Skip to content

Commit 5bfab39

Browse files
MapTo0ilhan007
authored andcommitted
refactor(ui5-shellbar-item): Rename press event to itemClick (#606)
BREAKING CHANGE: ui5-shellbar-item press event is renamed to itemClick
1 parent 8507f2e commit 5bfab39

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/main/src/ShellBar.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ class ShellBar extends UI5Element {
680680
return item.shadowRoot.querySelector(`#${refItemId}`);
681681
})[0];
682682

683-
const prevented = !shellbarItem.fireEvent("press", { targetRef: event.target }, true);
683+
const prevented = !shellbarItem.fireEvent("itemClick", { targetRef: event.target }, true);
684684

685685
this._defaultItemPressPrevented = prevented;
686686
}

packages/main/src/ShellBarItem.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const metadata = {
4040
* @param {HTMLElement} targetRef dom ref of the clicked element
4141
* @public
4242
*/
43-
press: {
43+
itemClick: {
4444
detail: {
4545
targetRef: { type: HTMLElement },
4646
},

packages/main/test/sap/ui/webcomponents/main/pages/ShellBar.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@
196196
});
197197

198198
["disc", "call"].forEach(function(id) {
199-
window[id].addEventListener("ui5-press", function(event) {
199+
window[id].addEventListener("ui5-itemClick", function(event) {
200200
event.preventDefault();
201201
window["press-input"].value = event.target.id;
202202
window["custom-item-popover"].openBy(event.detail.targetRef);

0 commit comments

Comments
 (0)