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.

[Table] Add directive for clickable mat-row

See original GitHub issue

Bug, feature request, or proposal:

It would be great if mat-row (part of mat-table) supported the navigation list feature that can currently be found in lists. I.e., hover on a row highlighted the row, and click on a row added a ripple. The cursor should change to pointer.

This would be great for tables that are intended to have only one main action.

What is the expected behavior?

If mat-row has a special directive applied, say, nav-row, then hover on a row highlights the row, and click on a row adds a ripple. Also, the cursor should change to pointer.

What is the current behavior?

No highlights or ripples. The cursor is default.

What are the steps to reproduce?

http://plnkr.co/edit/A70Yw5fBc7HLrbDIlivl?p=preview

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

It would be great for use cases when the user needs to select (by clicking) a single row in a mat-table

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

Angular 4.4.4 Material 2.0.0-beta.11

Is there anything else we should know?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:20
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
ndunkscommented, Nov 22, 2018

Angular material table with ripple effect, check here: https://stackblitz.com/edit/angular-zjjtui?file=app%2Ftable-basic-example.html

3reactions
jelbourncommented, Oct 27, 2017

It’s not something that would be built into the row, but possibly a separate direction like matActionRow. The a11y story would need some thought first.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular Material 7: Link for whole row - Stack Overflow
What I want to achieve is a link for a whole row in order to show a detail page. The requirement is to...
Read more >
Mat Table Row Click Event - StackBlitz
Mat table row click event sample.
Read more >
Table | Angular Material
To add sorting behavior to the table, add the matSort directive to the table and add mat-sort-header to each column header cell that...
Read more >
[Part 2] Add and Remove Table Rows using Angular Material
Add a new button with a click event just before the table ... <tr mat-row *matRowDef="let row; columns: displayedColumns"></tr> </table>.
Read more >
Angular mat-table sort example: Adding sorting to the material ...
Step 2: Import MatSort and sort in the component. Step 3: Add matSort directive to the table; Step 4: Add mat-sort-header directive 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