question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Document limitation of matRipple on native table rows and possible solutions

See original GitHub issue

Bug, feature request, or proposal:

Bug

What is the expected behavior?

The ripple effect should be contained within the table row.

What is the current behavior?

When using <tr mat-row> in Angular 6 instead of <mat-row ...>, the ripple effect isn’t contained within its parent container. I believe this is caused by the fact that div (the container used for the ripple) is not a valid child of the tr element it’s applied to.

What are the steps to reproduce?

https://stackblitz.com/edit/angular-material2-issue-myteuk

What is the use-case or motivation for changing an existing behavior?

N/A

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular 6.x

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:25 (7 by maintainers)

github_iconTop GitHub Comments

19reactions
rocos-yishicommented, Nov 22, 2018
  <table mat-table [dataSource]="items">
    <!-- Name Column -->
    <ng-container matColumnDef="name">
      <mat-header-cell *matHeaderCellDef> Name </mat-header-cell>
      <mat-cell *matCellDef="let item"> {{item.name}} </mat-cell>
    </ng-container>

    <mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
    <mat-row *matRowDef="let row; columns: displayedColumns;" matRipple></mat-row>
  </table>

That works for me. 😃

6reactions
simeylacommented, Apr 4, 2019

Still not working?

You probably forgot imports: [ MatRippleModule ]

Read more comments on GitHub >

github_iconTop Results From Across the Web

MatRipple is displaying ripple outside table row - Stack Overflow
Looks like this is a known issue: https://github.com/angular/material2/issues/11883. A potential workaround using mat-table <table mat-table ...
Read more >
Table | Angular Material
The mat-table provides a Material Design styled data-table that can be used to display rows of data. This table builds on the foundation...
Read more >
Mat Ripple In Mat Table Row Correction - StackBlitz
Starter project for Angular apps that exports to the Angular CLI.
Read more >
JDI Light Framework - GitHub Pages
JDI Light Framework. JDI Light is a powerful Test Automation Framework that helps to make your tests fast, sustainable and provides obvious and...
Read more >
angular/material/_theming.scss - UNPKG
Any relative import paths we use here will become invalid once the file is ... which can't depend on this mixin due to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found