Reputation: 11
I have a angular material table with check box row. Material Table Based on check and unchecked i want to manipulate other field from selected checkbox row value.
Upvotes: 1
Views: 1512
Reputation: 155
What you can do is use the "selection" method. Using your selection model, you can then list your selected rows. in your .ts file:
selection = new SelectionModel<Your_data_model>(true, []);
then with a click button or a method of your choosing, you can display or iterated through the selected records using:
this.selection.selected
You can view the selection in your browser console:
console.log(this.selection.selected);
Hope this helps.
Upvotes: 2