Skip to content

Conversation

PetyaMarkovaBogdanova
Copy link
Contributor

@PetyaMarkovaBogdanova PetyaMarkovaBogdanova commented Sep 2, 2025

No description provided.

@@ -60,6 +74,17 @@ class ToolbarItem extends UI5Element {
@property({ type: Boolean })
isOverflowed: boolean = false;

/**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicated comment

@@ -16,13 +20,23 @@ type ToolbarItemEventDetail = {
bubbles: true,
})

@event("click", {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need this click event?

@@ -107,10 +132,27 @@ class ToolbarItem extends UI5Element {
},
};
}

constructor() {
super();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since the constructor doesn't handle any arguments, this override can be omitted

* If `preventOverflowClosing` is false, it will fire a "close-overflow" event.
*/
onClick(e: Event): void {
e.stopImmediatePropagation();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We stop the propagation here which may lead to apps not being able to handle the click event on a higher level container. If possible, let's try to avoid that.


export default function ToolbarItemTemplate(this: ToolbarItem) {
return (
<div onClick={this.onClick}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once we have a sample with different types of components we should test if this click only event handling is enough to manage the closing of the popover. If not we should extend it or think of another mehanism.

@@ -0,0 +1,68 @@
<!DOCTYPE html>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add other components : Title, Text, Input, CheckBox, ToggleButton, DIV

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants