components icon indicating copy to clipboard operation
components copied to clipboard

[Table] Allow rows to be anchors

Open alex321 opened this issue 9 years ago • 4 comments

Feature request:

Would it be possible to provide support to make md-row be surrounded by an anchor tag?

What is the expected behavior?

It is useful to be able to use browser shortcuts or right-click contextual menu for rows of a table to open in new tabs, etc. In order to do that easily, the table rows itself need to be <a>.

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

It helps in order to diversify the usability of the md-table.

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

Material: 2.0.0-beta.11

alex321 avatar Sep 26 '17 14:09 alex321

Being an anchor tag would hurt the accessibility of the table overall

jelbourn avatar Nov 29 '17 01:11 jelbourn

Being an anchor would allow to right click -> open in a new tab. Do you have a suggestion to achieve this in another way?

mkollers avatar Apr 01 '18 16:04 mkollers

Here's an approach you can use: https://stackblitz.com/edit/angular-gpmd5v?file=app%2Ftable-basic-example.scss

There is an extra column that is taken out of the flow by using absolute positioning. It covers the whole row and contains an anchor.

andrewseguin avatar Apr 02 '18 16:04 andrewseguin

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.