MCPcopy Create free account
hub / github.com/UI5/webcomponents / onBeforeRendering

Method onBeforeRendering

packages/main/src/Button.ts:491–500  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

489 }
490
491 async onBeforeRendering() {
492 this._setBadgeOverlayStyle();
493
494 this.hasIcon = !!this.icon;
495 this.hasEndIcon = !!this.endIcon;
496 this.iconOnly = this.isIconOnly;
497
498 const defaultTooltip = await this.getDefaultTooltip();
499 this.buttonTitle = this.iconOnly ? this.tooltip ?? defaultTooltip : this.tooltip;
500 }
501
502 _setBadgeOverlayStyle() {
503 const needsOverflowVisible = this.badge.length && (this.badge[0].design === ButtonBadgeDesign.AttentionDot || this.badge[0].design === ButtonBadgeDesign.OverlayText);

Callers

nothing calls this directly

Calls 2

_setBadgeOverlayStyleMethod · 0.95
getDefaultTooltipMethod · 0.95

Tested by

no test coverage detected