Skip to content

Commit

Permalink
fix(grid): condition row highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
CatalinB7 committed Nov 13, 2023
1 parent a8d9acc commit 3c624dc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 7 additions & 0 deletions projects/angular/components/ui-grid/src/ui-grid.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,13 @@ export class UiGridComponent<T extends IGridDataEntry>
@Input()
useCardView = false;

/**
* If the grid allows highlighting of a row
*
*/
@Input()
allowHighlight = false;

/**
* Id of the entity that should be highlighted
*
Expand Down

0 comments on commit 3c624dc

Please sign in to comment.