Skip to content

Commit

Permalink
optimize code
Browse files Browse the repository at this point in the history
  • Loading branch information
nielslyngsoe committed Nov 26, 2024
1 parent 29a376c commit 2bb4b11
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/uui-table/lib/uui-table-row.element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,13 @@ export class UUITableRowElement extends SelectOnlyMixin(
private updateChildSelectOnly() {
if (this.slotCellNodes) {
this.slotCellNodes.forEach(el => {
if (this.elementIsTableCell(el)) {
if (el instanceof UUITableCellElement) {
el.disableChildInteraction = this.selectOnly;
}
});
}
}

private elementIsTableCell(element: unknown): element is UUITableCellElement {
return element instanceof UUITableCellElement;
}

render() {
return html` <slot @slotchanged=${this.updateChildSelectOnly}></slot> `;
}
Expand Down

0 comments on commit 2bb4b11

Please sign in to comment.