{"action":"closed","issue":{"url":"https://api.github.com/repos/xmartlabs/Eureka/issues/605","repository_url":"https://api.github.com/repos/xmartlabs/Eureka","labels_url":"https://api.github.com/repos/xmartlabs/Eureka/issues/605/labels{/name}","comments_url":"https://api.github.com/repos/xmartlabs/Eureka/issues/605/comments","events_url":"https://api.github.com/repos/xmartlabs/Eureka/issues/605/events","html_url":"https://github.com/xmartlabs/Eureka/issues/605","id":170421321,"number":605,"title":"reloadData(), updateCell() and displayValueFor","user":{"login":"allaire","id":304461,"avatar_url":"https://avatars.githubusercontent.com/u/304461?v=3","gravatar_id":"","url":"https://api.github.com/users/allaire","html_url":"https://github.com/allaire","followers_url":"https://api.github.com/users/allaire/followers","following_url":"https://api.github.com/users/allaire/following{/other_user}","gists_url":"https://api.github.com/users/allaire/gists{/gist_id}","starred_url":"https://api.github.com/users/allaire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allaire/subscriptions","organizations_url":"https://api.github.com/users/allaire/orgs","repos_url":"https://api.github.com/users/allaire/repos","events_url":"https://api.github.com/users/allaire/events{/privacy}","received_events_url":"https://api.github.com/users/allaire/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-10T13:47:28Z","updated_at":"2016-08-10T18:21:48Z","closed_at":"2016-08-10T18:21:48Z","body":"Hi,\r\n\r\nI'm using `displayValueFor` in `cellUpdate` to position's name in a field instead of its value (which is a uuid).\r\n\r\n```swift\r\ncellUpdate { (cell, row) in\r\n            if let site = self.selectedSite {\r\n                row.displayValueFor = { (option: String?) in\r\n                    if let id = option, let position = site.positions.filter({ $0.id == id }).first {\r\n                        return position.name\r\n                    } else {\r\n                        return nil\r\n                    }\r\n                }\r\n            }\r\n        }\r\n```\r\n\r\nWhen I'm in edit mode, I pre fill the data and then reload the tableview.\r\n\r\nI found that I had to run `positionRow.updateCell()` in order to display the position name correctly, where `tableView.reloadData()` does not work. `positionRow.reload()` does not work as well.\r\n\r\nI thought they were pretty much equivalent? am I using `displayValueFor` correctly and in the correct callback (`cellUpdate`)?"}}
{"actor":{"display_login":"allaire"}}