I have a simple button inside a Tab, if is set the [backgroundColor] property of the Tab-Group, the Button looses it's ripple effect.
Check this Stackblitz for live-demo
<mat-tab-group [color]="primary" [backgroundColor]="'primary'">
<!-- Try Removing the [backgroundColor] property in the above line
and click the button to see the ripple effect-->
<mat-tab label="First">
<button mat-raised-button>Button Looses Ripple</button>
</mat-tab>
<mat-tab label="Second">
<button mat-raised-button>Button Looses Ripple</button>
</mat-tab>
<mat-tab label="Third">
<button mat-raised-button>Button Looses Ripple</button>
</mat-tab>
</mat-tab-group>
However, if I remove the [backgroundColor] Property, the button regains its ripple effect.!
<mat-tab-group [color]="primary">
<mat-tab label="First">
<button mat-raised-button>Button has Ripple</button>
</mat-tab>
<mat-tab label="Second">
<button mat-raised-button>Button has Ripple</button>
</mat-tab>
<mat-tab label="Third">
<button mat-raised-button>Button has Ripple</button>
</mat-tab>
</mat-tab-group>
Am I doing anything wrong?? If not then help me to solve this Problem...
UPDATE:! Setting the color for the button does the trick.. but what if I want to achieve like the below
<mat-tab-group [color]="primary" [backgroundColor]="'primary'">
<!-- TAB -->
<mat-tab label="Third">
<!-- RIPPLE NOT_WORKING -->
<div class="div-style mat-elevation-z4" matRipple> Not Working </div>
</mat-tab>
</mat-tab-group>
<!-- RIPPLE_WORKING -->
<div class="div-style mat-elevation-z4" matRipple> Woring </div>