Vue-material: selected/unselected events for md-table-row

Created on 23 Jan 2017  路  5Comments  路  Source: vuematerial/vue-material

Hi,

Can you emit selected/unselected (or select/unselect) events on md-table-row. When using online datasource select event from md-table provides only items on the visible page, handling selected rows globally is more logical if rows emit select events.

improvement

Most helpful comment

md-table emits select event with all selected items when an item selected or deselected. But i need a select and deselect event from the md-table-row being selected or deselected cause i want to manage the selected items. I need to preserve selected items between page changes and datasource changes etc.

md-table has a bug right now on managing selected items and this solution is more sutiable for my use senario and more easy to implement (i think).

All 5 comments

Sorry, but I didn't understand what you want. Can you explain better?

md-table emits select event with all selected items when an item selected or deselected. But i need a select and deselect event from the md-table-row being selected or deselected cause i want to manage the selected items. I need to preserve selected items between page changes and datasource changes etc.

md-table has a bug right now on managing selected items and this solution is more sutiable for my use senario and more easy to implement (i think).

I see. I'm going to develop a brand new table component with backwards compatibility. So after that I will fire those events. Sorry to make you wait that.

I'm trying to figure out how to be able to throw a select event without having to add the check boxes on each row. I'm guessing this is one in the same request. What I'm trying to do is paginate a huge list of items and if the user selects a single item, it opens a new page with more details of that item. However, Id also like to be able to put some buttons in one of the columns so I need to be able to disable the click even on that column so it doesnt mess with the button click events when I click on the row. I hope that makes sense.

Fixing it on PR #787
Closing this issue for now. Reply on the PR.

Was this page helpful?
0 / 5 - 0 ratings