daniel-nagy / md-data-table

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

Problem with selected items #351

Open vodyan opened 8 years ago

vodyan commented 8 years ago

Hi,

i have some Problem with multiple tables. Hier ist my page:

[http://78.46.136.179/#/]

I have five tables. When I select an order (tr item), as well as the other tables show an item as selected. Can you helf me, please?

Login: a.wodjanko@stamp-media-kiel.de Passwort: stampmedia

My controller:

... $scope.states = [ {name: "open", icon: "history"} {name: "checking", icon: "comment-check-outline"} {name: "processing", icon: "settings"} {name: "shipping", icon: "truck"} {name: "archived", icon: "archive"} ] $scope.selected = [] ...

I tried to create a foreach loop, unfortunately without success(coffee script):

selected = {} for key of $scope.states selected[key] = [ ] $scope.selected = selected

and view:

`

{{orders[state.name].length}}

... ... ...
{{order.counter}} {{order.Job_number}} {{order.user.name}} {{order.updated_at|date:'dd.MM.yyyy HH:mm:ss'}}

`

daniel-nagy commented 8 years ago

I think you are using an old version of the data table that was known to have scoping issues. Can you update to a more recent version? The current version is v0.10.3, I think you are using v0.8.x.

vodyan commented 8 years ago

Thank you for your message. I'll try it. Thanks again!