{"action":"created","issue":{"url":"https://api.github.com/repos/Instagram/IGListKit/issues/597","repository_url":"https://api.github.com/repos/Instagram/IGListKit","labels_url":"https://api.github.com/repos/Instagram/IGListKit/issues/597/labels{/name}","comments_url":"https://api.github.com/repos/Instagram/IGListKit/issues/597/comments","events_url":"https://api.github.com/repos/Instagram/IGListKit/issues/597/events","html_url":"https://github.com/Instagram/IGListKit/issues/597","id":218222515,"number":597,"title":"ItemAtIndex methods always return index 0","user":{"login":"OrCoolCousin","id":25489520,"avatar_url":"https://avatars3.githubusercontent.com/u/25489520?v=3","gravatar_id":"","url":"https://api.github.com/users/OrCoolCousin","html_url":"https://github.com/OrCoolCousin","followers_url":"https://api.github.com/users/OrCoolCousin/followers","following_url":"https://api.github.com/users/OrCoolCousin/following{/other_user}","gists_url":"https://api.github.com/users/OrCoolCousin/gists{/gist_id}","starred_url":"https://api.github.com/users/OrCoolCousin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OrCoolCousin/subscriptions","organizations_url":"https://api.github.com/users/OrCoolCousin/orgs","repos_url":"https://api.github.com/users/OrCoolCousin/repos","events_url":"https://api.github.com/users/OrCoolCousin/events{/privacy}","received_events_url":"https://api.github.com/users/OrCoolCousin/received_events","type":"User","site_admin":false},"labels":[{"id":438144356,"url":"https://api.github.com/repos/Instagram/IGListKit/labels/question","name":"question","color":"D10869","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-03-30T14:47:20Z","updated_at":"2017-05-05T15:19:33Z","closed_at":"2017-04-11T22:43:50Z","body":"## New issue checklist\r\n\r\n- [v] I have reviewed the [`README`](https://github.com/Instagram/IGListKit/blob/master/README.md) and [documentation](http://instagram.github.io/IGListKit)\r\n- [v] I have searched [existing issues](https://github.com/Instagram/IGListKit/issues) and this is not a duplicate\r\n\r\n### General information\r\n\r\n- `IGListKit` version: 2.0.0\r\n- iOS version(s): 10.2.1, 10.2\r\n- Xcode version: 7.3.1\r\n- Reproducible in the demo project? (Yes/No): Yes\r\n\r\nI created an extension for my section controller\r\n`extension MySectionController: IGListSectionType`\r\n\r\nEach time one of the following methods is called:\r\ncellForItemAtIndex\r\nsizeForItemAtIndex\r\ndidSelectItemAtIndex\r\n\r\nthe index value past to the function is always 0.\r\n\r\nOn `didSelectItemAtIndex` I am changing the cell state and calling\r\n`collectionContext?.reloadSectionController(self)` but again the index is 0. The cell updates the way I want but without the correct index I can't update the rest of the cells."},"comment":{"url":"https://api.github.com/repos/Instagram/IGListKit/issues/comments/299493730","html_url":"https://github.com/Instagram/IGListKit/issues/597#issuecomment-299493730","issue_url":"https://api.github.com/repos/Instagram/IGListKit/issues/597","id":299493730,"user":{"login":"jonauz","id":1802118,"avatar_url":"https://avatars1.githubusercontent.com/u/1802118?v=3","gravatar_id":"","url":"https://api.github.com/users/jonauz","html_url":"https://github.com/jonauz","followers_url":"https://api.github.com/users/jonauz/followers","following_url":"https://api.github.com/users/jonauz/following{/other_user}","gists_url":"https://api.github.com/users/jonauz/gists{/gist_id}","starred_url":"https://api.github.com/users/jonauz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonauz/subscriptions","organizations_url":"https://api.github.com/users/jonauz/orgs","repos_url":"https://api.github.com/users/jonauz/repos","events_url":"https://api.github.com/users/jonauz/events{/privacy}","received_events_url":"https://api.github.com/users/jonauz/received_events","type":"User","site_admin":false},"created_at":"2017-05-05T15:19:33Z","updated_at":"2017-05-05T15:19:33Z","body":"Hi, Don't understand how come this questions is closed, when issue don't seem to be solved. \r\nI just came across of the same issue, and I noticed that none of examples is using `index` in `didSelectItem(at index: Int)` function.\r\nI followed all possible implementations and this function seems to have some logic issue or a bug.\r\nI need `index` to identify which cell was selected in horizontal embedded collection view. But index is always 0, and examples don't use and don't show how to access this index.\r\nNormally in our code we always use this parameter to identify which data we should use from the data source.\r\nPlease, could you explain how to access index or the selected object related with selected cell?\r\nAnd also, what is the use of `index` if it's always 0. Does seem like a bug. Maybe was missed as other use some other ways for such implementation.\r\nPlease share some more knowledge on this."}}
{"actor":{"display_login":"jonauz"}}