When using mat-list with matRipple for click animations, the default behavior is for the ripple animations to disappear after a while. However, I want to keep the animation even after clicking so that the background color won't change. Is there a way to maintain the background style?
<mat-list #selectable
role="list">
<mat-list-item *ngFor="let item of ItemsSource; let i = index;"
(click)="OnRowClicked(item)"
role="listitem"
matRipple>
{{item["Description"]}}
<mat-divider></mat-divider>
</mat-list-item>
</mat-list>
public ItemsSource = [{Description: "test", Code: "1" },
{Description: "test2", Code: "2" }];
public SelectedItem: any;
public OnRowClicked(event: any) {
this.SelectedItem = event;
}
Check out the fork here: https://stackblitz.com/edit/angular-vrus3x