daniel-nagy / md-data-table

Material Design Data Table for Angular Material
MIT License
1.9k stars 519 forks source link

Random rows being selected with ng-repeat and md-row-select #126

Open sunocean-sand opened 9 years ago

sunocean-sand commented 9 years ago

I'm using md-data-table with ng-repeat to display item for different objects.

The only problem I'm having is that when I select an item under an object, it automatically selects other random rows that I did not click on. Is anyone else having the same problem?

daniel-nagy commented 9 years ago

@sunocean-sand can you fork the codepen and try to reproduce this issue?

sunocean-sand commented 9 years ago

@daniel-nagy Yes I will! In the process of trying to reproduce it..

zegerhoogeboom commented 7 years ago

Sorry to bump this old issue but i'm experiencing the same problem. Any clue @daniel-nagy @sunocean-sand? bug

<table md-table md-row-select multiple ng-model="selectedRows" md-progress="promise" class="small_padding">
....
  <tr md-row ui-sref="variantsDetails({id: variant.variantId})" 
  ng-click="" 
  md-select="variant" 
  ng-model="selectedRows" 
  md-select-id="variantId" 
  ng-repeat="variant in variants" >...</tr>
</table>

The "unselectable" rows do appear in the selectedRows array and are correct. The variantId really is unique and is there in every row. Different usages of the library work fine for me.

Using v0.10.10.