Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion projects/components/src/table/table.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ $header-height: 32px;
}

&.selected-row {
background: $gray-1;
background: $blue-1;
border-bottom: 1px solid $blue-2;
border-top: 1px solid $blue-2;

Expand Down
4 changes: 2 additions & 2 deletions projects/components/src/table/table.component.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ describe('Table component', () => {
expect(spectator.component.shouldHighlightRowAsSelection(statefulRows[1])).toBeFalsy();
});

test('row should not be highlighted only in multi selection mode', () => {
test('row should be highlighted (even) when in multi selection mode', () => {
const columns = buildColumns();
const rows = buildData();
const statefulRows = TableCdkRowUtil.buildInitialRowStates(rows);
Expand All @@ -504,7 +504,7 @@ describe('Table component', () => {
}
);

expect(spectator.component.shouldHighlightRowAsSelection(statefulRows[0])).toBeFalsy();
expect(spectator.component.shouldHighlightRowAsSelection(statefulRows[0])).toBeTruthy();
expect(spectator.component.shouldHighlightRowAsSelection(statefulRows[1])).toBeFalsy();
});

Expand Down
1 change: 0 additions & 1 deletion projects/components/src/table/table.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,6 @@ export class TableComponent

public shouldHighlightRowAsSelection(row: StatefulTableRow): boolean {
return (
this.selectionMode !== TableSelectionMode.Multiple &&
this.selections !== undefined &&
this.selections.find(selection => TableCdkRowUtil.isEqualExceptState(selection, row)) !== undefined
);
Expand Down