components icon indicating copy to clipboard operation
components copied to clipboard

How to make the mat-table row selected on single or double click.

Open porbis-rmishra opened this issue 8 years ago • 5 comments

Dear Angular 4 Material Team,

I have been using Angular 5 and Angular material. Could you please provide me the code how can I change the colour of the mat-table row on single or double click on row .

Regards, Rupesh

porbis-rmishra avatar Jan 30 '18 15:01 porbis-rmishra

Please keep GitHub issues for bug reports / feature requests. Better avenues for troubleshooting / questions are stack overflow, gitter, mailing list, etc. Also duplicate of #8027

donroyco avatar Jan 30 '18 15:01 donroyco

Please keep GitHub issues for bug reports / feature requests. Better avenues for troubleshooting / questions are stack overflow, gitter, mailing list, etc.

josephperrott avatar Jan 30 '18 17:01 josephperrott

@damco-rupesh You can directly apply click handlers and class/style bindings on the mat-row.

Here's an example where rows will highlight when clicked: https://stackblitz.com/edit/angular-tt9tdw?file=app/table-basic-example.html

andrewseguin avatar Jan 30 '18 19:01 andrewseguin

@damco-rupesh You can directly apply click handlers and class/style bindings on the mat-row.

Here's an example where rows will highlight when clicked: https://stackblitz.com/edit/angular-tt9tdw?file=app/table-basic-example.html

Thanks much andrewsguin

Saved my time.

kamalSaiDd avatar Nov 02 '18 16:11 kamalSaiDd

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.