tochoromero / aurelia-table

Simple functional data table for Aurelia
https://tochoromero.github.com/aurelia-table
MIT License
67 stars 25 forks source link

rowSelected($event) is called only when the row is selected #22

Closed cosminonea closed 7 years ago

cosminonea commented 7 years ago

https://github.com/tochoromero/aurelia-table/blob/master/src/au-table-select.js#L83

Is there any reason why rowSelected is not being called when an item is deselected?

tochoromero commented 7 years ago

No, there is really no reason. However I think that if I were to implement that functionality, it would have to be a new event, since triggering the same event, even with a flag or something, could break current applications using it.

Any thoughts?

cosminonea commented 7 years ago

I was assuming that I need to keep track of the selected items. But the items in the view model get marked with an $isSelected which is perfect.

No need for a rowDeselected event.

tochoromero commented 7 years ago

Great, glad you figured it out :)