From 2bb4b11ddf6be4c272139696e8bdb2bc93178c5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Tue, 26 Nov 2024 21:15:18 +0100 Subject: [PATCH] optimize code --- packages/uui-table/lib/uui-table-row.element.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/uui-table/lib/uui-table-row.element.ts b/packages/uui-table/lib/uui-table-row.element.ts index 0c34a530f..aa188a3c5 100644 --- a/packages/uui-table/lib/uui-table-row.element.ts +++ b/packages/uui-table/lib/uui-table-row.element.ts @@ -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` `; }