[Table] Add directive for clickable mat-row
See original GitHub issueBug, 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:
- Created 6 years ago
- Reactions:20
- Comments:8 (4 by maintainers)
Top 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 >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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Angular material table with ripple effect, check here: https://stackblitz.com/edit/angular-zjjtui?file=app%2Ftable-basic-example.html
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.