0

I have a angular-mdl table http://mseemann.io/angular2-mdl/table that I'm loading data to from an ajax call. I'd like to allow the user to click on a row and react to that event, but I can't figure out how to determine which row they clicked on (using either the data from the row or an index).

HTML:

<mdl-table [table-model]="tableModel" (click)="WhatToDoHere()" ></mdl-table>
Scott R. Frost
  • 2,026
  • 1
  • 22
  • 25
  • 1
    You need to use `table-model-selectionChanged` in place of `(click)` event over here. Check the example with checkbox given in the link. Try something like that. – The Hungry Dictator Apr 26 '17 at 09:51
  • Not a bad idea, but I need it to work when you click anywhere in the row. I don't want to have to add a checkbox and force the user to check (since I only want single select, checkbox doesn't make sense). – Scott R. Frost Apr 27 '17 at 18:45

0 Answers0