{"action":"opened","issue":{"url":"https://api.github.com/repos/mikeric/rivets/issues/521","labels_url":"https://api.github.com/repos/mikeric/rivets/issues/521/labels{/name}","comments_url":"https://api.github.com/repos/mikeric/rivets/issues/521/comments","events_url":"https://api.github.com/repos/mikeric/rivets/issues/521/events","html_url":"https://github.com/mikeric/rivets/issues/521","id":108440466,"number":521,"title":"issue with collection.remove(model) rendering with rv-each-model='...","user":{"login":"levieraf","id":2042699,"avatar_url":"https://avatars.githubusercontent.com/u/2042699?v=3","gravatar_id":"","url":"https://api.github.com/users/levieraf","html_url":"https://github.com/levieraf","followers_url":"https://api.github.com/users/levieraf/followers","following_url":"https://api.github.com/users/levieraf/following{/other_user}","gists_url":"https://api.github.com/users/levieraf/gists{/gist_id}","starred_url":"https://api.github.com/users/levieraf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/levieraf/subscriptions","organizations_url":"https://api.github.com/users/levieraf/orgs","repos_url":"https://api.github.com/users/levieraf/repos","events_url":"https://api.github.com/users/levieraf/events{/privacy}","received_events_url":"https://api.github.com/users/levieraf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-26T04:53:36Z","updated_at":"2015-09-26T04:53:36Z","closed_at":null,"body":"Hi guys,\r\n\r\nI have:\r\n```javascript\r\nvar collection = new App.Collections.Notes();\r\nvar data = [\r\n    {id: 1, description: 'description short 1', removed: 0},\r\n    {id: 2, description: 'description short 2', removed: 0},\r\n    {id: 3, description: 'description short 3', removed: 0},\r\n    {id: 4, description: 'description short 4', removed: 0},\r\n    {id: 5, description: 'description short 5', removed: 0},\r\n    {id: 6, description: 'description short 6', removed: 0},\r\n    {id: 7, description: 'description short 7', removed: 0},\r\n    {id: 8, description: 'description short 8', removed: 0},\r\n    {id: 9, description: 'description short 9', removed: 0},\r\n    {id: 10, description: 'description short 10', removed: 0}\r\n];\r\n\r\n\r\nvar view = new App.Views.Applications.Test({\r\n    collection: collection\r\n});\r\nHelpers.htmlView(view, '.body');\r\ncollection.reset(data);\r\n```\r\nThe template:\r\n\r\n```\r\n<table class='table table-hover'>\r\n\t<tbody>\r\n\t\t<tr rv-each-modelRow='collection.models' rv-class-hidden='modelRow.isNotRemoved < :removed'>\r\n\t\t\t<td>\r\n\t\t\t\t<a href=\"javascript:void(0);\" class=\"btnRemove\" rv-data-id='modelRow:id'>Remove</a>\r\n\t\t\t</td>\r\n\t\t\t<td>{modelRow:id}</td>\r\n\t\t\t<td>{modelRow:description}</td>\r\n\t\t</tr>\r\n\t</tbody>\r\n</table>\r\n```\r\n\r\nWithin the view I have an action to remove the model clicked, is this:\r\n```javascript\r\n\tremoveRow: function (e) {\r\n\t\tvar element = $(e.currentTarget),\r\n\t\t\tid = element.data('id'),\r\n\t\t\tmodel = this.collection.get(id);\r\n\t\tthis.collection.remove(model);\r\n\t},\r\n```\r\n\r\nNow, if I remove the first one row, work perfect, this removes the model from the collection, but I click the second one row to remove, even after has been removed the first one from the dom and collection, this continue thinking that the first one is there. but it is not true.\r\n\r\nAny idea?\r\n\r\nsomeone with same issue before?\r\n\r\n"}}