diff --git a/projects/angular/components/ui-grid/src/ui-grid.component.html b/projects/angular/components/ui-grid/src/ui-grid.component.html index 888d76e7c..e6a547211 100644 --- a/projects/angular/components/ui-grid/src/ui-grid.component.html +++ b/projects/angular/components/ui-grid/src/ui-grid.component.html @@ -402,7 +402,7 @@ *ngIf="!isRowExpanded(row?.id) || expandMode === 'preserve'" [class.ui-grid-row-state-expanded]="isRowExpanded(row?.id)" [class.ui-grid-border-none]="!footer && last" - [class.highlighted-row]="highlightedEntityId != null && row.id != null && highlightedEntityId.toString() === row.id.toString()" + [class.highlighted-row]="allowHighlight && (row.id + '') === (highlightedEntityId + '')" [ngClass]="rowConfig?.ngClassFn(row) ?? ''" [tabIndex]="0" [attr.data-row-index]="index" diff --git a/projects/angular/components/ui-grid/src/ui-grid.component.ts b/projects/angular/components/ui-grid/src/ui-grid.component.ts index b688ece7f..5eaedd17e 100644 --- a/projects/angular/components/ui-grid/src/ui-grid.component.ts +++ b/projects/angular/components/ui-grid/src/ui-grid.component.ts @@ -412,6 +412,13 @@ export class UiGridComponent @Input() useCardView = false; + /** + * If the grid allows highlighting of a row + * + */ + @Input() + allowHighlight = false; + /** * Id of the entity that should be highlighted *