From 9b591cec45a95951bb5cded0c063dbc99605ab55 Mon Sep 17 00:00:00 2001 From: Arjunlal B Date: Fri, 5 Jan 2024 10:39:14 +0530 Subject: [PATCH] fix: add `clickOnRowToSelect` option to table --- projects/components/src/table/table.component.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/projects/components/src/table/table.component.ts b/projects/components/src/table/table.component.ts index 902cc87fe..42a2cd6fa 100644 --- a/projects/components/src/table/table.component.ts +++ b/projects/components/src/table/table.component.ts @@ -342,6 +342,9 @@ export class TableComponent @Input() public selectionMode?: TableSelectionMode = TableSelectionMode.Single; + @Input() + public clickOnRowToSelect?: boolean = true; + @Input() public title?: string; @@ -975,7 +978,9 @@ export class TableComponent public onDataRowClick(row: StatefulTableRow): void { this.rowClicked.emit(row); - this.toggleRowSelected(row); + if (this.clickOnRowToSelect) { + this.toggleRowSelected(row); + } } public onDataRowMouseEnter(row: StatefulTableRow): void {