Skip to content

Commit

Permalink
fix: add clickOnRowToSelect option to table
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunlalb committed Jan 5, 2024
1 parent d9db405 commit 9b591ce
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion projects/components/src/table/table.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,9 @@ export class TableComponent
@Input()
public selectionMode?: TableSelectionMode = TableSelectionMode.Single;

@Input()
public clickOnRowToSelect?: boolean = true;

@Input()
public title?: string;

Expand Down Expand Up @@ -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);

Check warning on line 982 in projects/components/src/table/table.component.ts

View check run for this annotation

Codecov / codecov/patch

projects/components/src/table/table.component.ts#L982

Added line #L982 was not covered by tests
}
}

public onDataRowMouseEnter(row: StatefulTableRow): void {
Expand Down

0 comments on commit 9b591ce

Please sign in to comment.