My goal is to enhance the appearance of a hovered row in mat-table by adjusting the elevation to a <tr>
on hover. However, I am facing an issue where the shadow effect that represents the elevation is not displaying at the bottom side of the row, even though it is visible for the top, left, and right sides.
.html
<div class="mat-elevation-z2" #TABLE>
<table mat-table [dataSource]="dataSource" matSort>
<!-- Required Columns... -->
<tr mat-header-row *matHeaderRowDef="columnsToDisplay"></tr>
<tr mat-row *matRowDef="let row; let e = index; columns: columnsToDisplay;"
(mouseover)="onMouseOver(e)" [ngClass] = "{'mat-elevation-z24' : e == mouseOverIndex}"></tr>
</table>
</div>
.ts
mouseOverIndex = -1;
public onMouseOver(index) {
this.mouseOverIndex = index;
}
.css
.mat-row:hover {
cursor: pointer;
}
What could be causing this issue?
I have attempted to use 'z24', 'z16', 'z8' etc but without success.