{"action":"created","issue":{"url":"https://api.github.com/repos/handsontable/handsontable/issues/3422","repository_url":"https://api.github.com/repos/handsontable/handsontable","labels_url":"https://api.github.com/repos/handsontable/handsontable/issues/3422/labels{/name}","comments_url":"https://api.github.com/repos/handsontable/handsontable/issues/3422/comments","events_url":"https://api.github.com/repos/handsontable/handsontable/issues/3422/events","html_url":"https://github.com/handsontable/handsontable/issues/3422","id":150256697,"number":3422,"title":"afterChange event doesn't provide correct row to match internal data when filtering.","user":{"login":"garypma","id":3473915,"avatar_url":"https://avatars.githubusercontent.com/u/3473915?v=3","gravatar_id":"","url":"https://api.github.com/users/garypma","html_url":"https://github.com/garypma","followers_url":"https://api.github.com/users/garypma/followers","following_url":"https://api.github.com/users/garypma/following{/other_user}","gists_url":"https://api.github.com/users/garypma/gists{/gist_id}","starred_url":"https://api.github.com/users/garypma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garypma/subscriptions","organizations_url":"https://api.github.com/users/garypma/orgs","repos_url":"https://api.github.com/users/garypma/repos","events_url":"https://api.github.com/users/garypma/events{/privacy}","received_events_url":"https://api.github.com/users/garypma/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/handsontable/handsontable/labels/Assistance%20needed","name":"Assistance needed","color":"0052cc"},{"url":"https://api.github.com/repos/handsontable/handsontable/labels/Core:%20callbacks","name":"Core: callbacks","color":"009800"},{"url":"https://api.github.com/repos/handsontable/handsontable/labels/Priority:%20normal","name":"Priority: normal","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-04-22T03:42:30Z","updated_at":"2016-05-11T08:06:14Z","closed_at":"2016-05-11T08:06:14Z","body":"**I'm posting this in the regular handsontable issues as there seems to be no response in the ngHandsontable issues section. Anyway, it may actual be an issue with the pro version of handsontable.\r\n**\r\nI have attached an afterChange event to my table. When the event fires after changing any cell the row provided in the charge argument is correct if I'm not filtering. While sorting I use the sortIndex to translate the sorted row to the correct data row. However, if I'm just filtering the table, there is no sortIndex and no other translation to map the row provided in the change param to the real row in my data. Here is my code:\r\n\r\n$scope.itemChanged = function (change, source) {\r\n\r\n            if (change === undefined || change === null)\r\n                return;\r\n\r\n            var row = change[0][0];\r\n            if ($scope.participants !== undefined && $scope.participants.length > row) {\r\n                var table = hotRegisterer.getInstance('compTable');\r\n                var dataIndex = row;\r\n                if (table.sortIndex.length > row) {\r\n                    dataIndex = table.sortIndex[row][0];\r\n                }\r\n\r\n                var part = $scope.participants[dataIndex];\r\n                console.log(\"row = \" + row + \", calculating bonus for \" + part.fullName);\r\n                compGridService.calculateBonus(part);\r\n            }\r\n        };\r\n\r\nUnder normal sorting or not sorting that row is mapped correctly, but when filtering the row returned is the row shown on the table not the ACTUAL row in my data. This is a major issue and may cause us to look for another solution if not resolved quickly. Maybe there is a translate feature, if so, any help would be great.\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/handsontable/handsontable/issues/comments/218390284","html_url":"https://github.com/handsontable/handsontable/issues/3422#issuecomment-218390284","issue_url":"https://api.github.com/repos/handsontable/handsontable/issues/3422","id":218390284,"user":{"login":"AMBudnik","id":10757813,"avatar_url":"https://avatars.githubusercontent.com/u/10757813?v=3","gravatar_id":"","url":"https://api.github.com/users/AMBudnik","html_url":"https://github.com/AMBudnik","followers_url":"https://api.github.com/users/AMBudnik/followers","following_url":"https://api.github.com/users/AMBudnik/following{/other_user}","gists_url":"https://api.github.com/users/AMBudnik/gists{/gist_id}","starred_url":"https://api.github.com/users/AMBudnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AMBudnik/subscriptions","organizations_url":"https://api.github.com/users/AMBudnik/orgs","repos_url":"https://api.github.com/users/AMBudnik/repos","events_url":"https://api.github.com/users/AMBudnik/events{/privacy}","received_events_url":"https://api.github.com/users/AMBudnik/received_events","type":"User","site_admin":false},"created_at":"2016-05-11T08:06:14Z","updated_at":"2016-05-11T08:06:14Z","body":"@garypma \r\nI'm closing this issue as the base case was solved and the second has already it's own issue at https://github.com/handsontable/handsontable/issues/3479"}}