Skip to content

Commit 25b2f3b

Browse files
authored
fix(ui5-shellbar): change content slot type (#12186)
1 parent fb561aa commit 25b2f3b

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

packages/fiori/src/ShellBar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ class ShellBar extends UI5Element {
559559
* @since 2.7.0
560560
*/
561561
@slot({ type: HTMLElement, individualSlots: true })
562-
content!: Array<UI5Element>;
562+
content!: Array<HTMLElement>;
563563

564564
@i18n("@ui5/webcomponents-fiori")
565565
static i18nBundle: I18nBundle;

packages/fiori/src/ShellBarTemplate.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,26 +100,26 @@ export default function ShellBarTemplate(this: ShellBar) {
100100
}}></div>
101101
)}
102102
{this.startContent.map(item => {
103-
const itemInfo = this._contentInfo.find(info => info.id === item._individualSlot);
103+
const itemInfo = this._contentInfo.find(info => info.id === (item as any)._individualSlot);
104104
return (
105-
<div key={item._individualSlot} id={item._individualSlot} class={itemInfo?.classes}>
105+
<div key={(item as any)._individualSlot} id={(item as any)._individualSlot} class={itemInfo?.classes}>
106106
{this.shouldIncludeSeparator(itemInfo, this.startContentInfoSorted) && (
107107
// never displayed, only "packed" with last item that was hidden, used for measurement purposes
108108
<div class={{
109109
"ui5-shellbar-separator": true,
110110
"ui5-shellbar-separator-start": true,
111111
}}></div>
112112
)}
113-
<slot name={item._individualSlot}></slot>
113+
<slot name={(item as any)._individualSlot}></slot>
114114
</div>
115115
);
116116
})}
117117
<div class="ui5-shellbar-spacer"></div>
118118
{this.endContent.map(item => {
119-
const itemInfo = this._contentInfo.find(info => info.id === item._individualSlot);
119+
const itemInfo = this._contentInfo.find(info => info.id === (item as any)._individualSlot);
120120
return (
121-
<div key={item._individualSlot} id={item._individualSlot} class={itemInfo?.classes}>
122-
<slot name={item._individualSlot}></slot>
121+
<div key={(item as any)._individualSlot} id={(item as any)._individualSlot} class={itemInfo?.classes}>
122+
<slot name={(item as any)._individualSlot}></slot>
123123
{this.shouldIncludeSeparator(itemInfo, this.endContentInfoSorted) && (
124124
// never displayed, only "packed" with last item that was hidden, used for measurement purposes
125125
<div class={{

0 commit comments

Comments
 (0)