umb-table fixes issue with icon
The `item.icon` is nullable, which isn't picked up by the `ifDefined` check, so causes a Typescript error. Also amends CSS to align the icon with the swappable checkbox.
This commit is contained in:
@@ -219,7 +219,7 @@ export class UmbTableElement extends LitElement {
|
||||
if (this.config.hideIcon && !this.config.allowSelection) return;
|
||||
|
||||
return html`<uui-table-cell>
|
||||
${when(!this.config.hideIcon, () => html`<uui-icon name=${ifDefined(item.icon)}></uui-icon>`)}
|
||||
${when(!this.config.hideIcon, () => html`<uui-icon name=${ifDefined(item.icon ?? undefined)}></uui-icon>`)}
|
||||
${when(
|
||||
this.config.allowSelection,
|
||||
() =>
|
||||
@@ -311,6 +311,10 @@ export class UmbTableElement extends LitElement {
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
uui-table-cell uui-icon {
|
||||
vertical-align: top;
|
||||
}
|
||||
`,
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user