{"action":"created","issue":{"url":"https://api.github.com/repos/palantir/blueprint/issues/585","repository_url":"https://api.github.com/repos/palantir/blueprint","labels_url":"https://api.github.com/repos/palantir/blueprint/issues/585/labels{/name}","comments_url":"https://api.github.com/repos/palantir/blueprint/issues/585/comments","events_url":"https://api.github.com/repos/palantir/blueprint/issues/585/events","html_url":"https://github.com/palantir/blueprint/issues/585","id":204432603,"number":585,"title":"Table: Update ICellRenderer and IColumnHeaderRenderer for latest DT.","user":{"login":"ericanderson","id":120899,"avatar_url":"https://avatars.githubusercontent.com/u/120899?v=3","gravatar_id":"","url":"https://api.github.com/users/ericanderson","html_url":"https://github.com/ericanderson","followers_url":"https://api.github.com/users/ericanderson/followers","following_url":"https://api.github.com/users/ericanderson/following{/other_user}","gists_url":"https://api.github.com/users/ericanderson/gists{/gist_id}","starred_url":"https://api.github.com/users/ericanderson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericanderson/subscriptions","organizations_url":"https://api.github.com/users/ericanderson/orgs","repos_url":"https://api.github.com/users/ericanderson/repos","events_url":"https://api.github.com/users/ericanderson/events{/privacy}","received_events_url":"https://api.github.com/users/ericanderson/received_events","type":"User","site_admin":false},"labels":[{"id":480887520,"url":"https://api.github.com/repos/palantir/blueprint/labels/Package:%20table","name":"Package: table","color":"f5f8fa","default":false}],"state":"open","locked":false,"assignee":{"login":"gscshoyru","id":2463526,"avatar_url":"https://avatars.githubusercontent.com/u/2463526?v=3","gravatar_id":"","url":"https://api.github.com/users/gscshoyru","html_url":"https://github.com/gscshoyru","followers_url":"https://api.github.com/users/gscshoyru/followers","following_url":"https://api.github.com/users/gscshoyru/following{/other_user}","gists_url":"https://api.github.com/users/gscshoyru/gists{/gist_id}","starred_url":"https://api.github.com/users/gscshoyru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gscshoyru/subscriptions","organizations_url":"https://api.github.com/users/gscshoyru/orgs","repos_url":"https://api.github.com/users/gscshoyru/repos","events_url":"https://api.github.com/users/gscshoyru/events{/privacy}","received_events_url":"https://api.github.com/users/gscshoyru/received_events","type":"User","site_admin":false},"assignees":[{"login":"gscshoyru","id":2463526,"avatar_url":"https://avatars.githubusercontent.com/u/2463526?v=3","gravatar_id":"","url":"https://api.github.com/users/gscshoyru","html_url":"https://github.com/gscshoyru","followers_url":"https://api.github.com/users/gscshoyru/followers","following_url":"https://api.github.com/users/gscshoyru/following{/other_user}","gists_url":"https://api.github.com/users/gscshoyru/gists{/gist_id}","starred_url":"https://api.github.com/users/gscshoyru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gscshoyru/subscriptions","organizations_url":"https://api.github.com/users/gscshoyru/orgs","repos_url":"https://api.github.com/users/gscshoyru/repos","events_url":"https://api.github.com/users/gscshoyru/events{/privacy}","received_events_url":"https://api.github.com/users/gscshoyru/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/palantir/blueprint/milestones/11","html_url":"https://github.com/palantir/blueprint/milestone/11","labels_url":"https://api.github.com/repos/palantir/blueprint/milestones/11/labels","id":2255658,"number":11,"title":"1.9.0","description":"","creator":{"login":"llorca","id":199754,"avatar_url":"https://avatars.githubusercontent.com/u/199754?v=3","gravatar_id":"","url":"https://api.github.com/users/llorca","html_url":"https://github.com/llorca","followers_url":"https://api.github.com/users/llorca/followers","following_url":"https://api.github.com/users/llorca/following{/other_user}","gists_url":"https://api.github.com/users/llorca/gists{/gist_id}","starred_url":"https://api.github.com/users/llorca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/llorca/subscriptions","organizations_url":"https://api.github.com/users/llorca/orgs","repos_url":"https://api.github.com/users/llorca/repos","events_url":"https://api.github.com/users/llorca/events{/privacy}","received_events_url":"https://api.github.com/users/llorca/received_events","type":"User","site_admin":false},"open_issues":19,"closed_issues":1,"state":"open","created_at":"2017-01-16T18:37:18Z","updated_at":"2017-02-06T21:11:37Z","due_on":"2017-02-10T08:00:00Z","closed_at":null},"comments":1,"created_at":"2017-01-31T21:44:52Z","updated_at":"2017-02-06T22:35:02Z","closed_at":null,"body":"### Bug report\r\n\r\n- __Package version(s)__: @blueprint/table 1.3.0\r\n\r\n#### Steps to reproduce\r\n\r\n1. Use latest typings from DT.\r\n1. Notice cell renderers cannot be cast any more\r\n\r\n#### Actual behavior\r\n\r\nErrors:\r\n```\r\nfile: 'file:///redacted/file.tsx'\r\nseverity: 'Error'\r\nmessage: 'Type '(rowIndex: number, columnIndex: number) => Element' is not assignable to type 'ICellRenderer | undefined'.\r\n  Type '(rowIndex: number, columnIndex: number) => Element' is not assignable to type 'ICellRenderer'.\r\n    Type 'Element' is not assignable to type 'ReactElement<ICellProps>'.\r\n      Type 'null' is not assignable to type 'ReactElement<ICellProps>'.'\r\nat: '92,7'\r\nsource: 'ts'\r\n```\r\n\r\n#### Expected behavior\r\n\r\nDoesnt error.\r\n"},"comment":{"url":"https://api.github.com/repos/palantir/blueprint/issues/comments/277836750","html_url":"https://github.com/palantir/blueprint/issues/585#issuecomment-277836750","issue_url":"https://api.github.com/repos/palantir/blueprint/issues/585","id":277836750,"user":{"login":"gscshoyru","id":2463526,"avatar_url":"https://avatars.githubusercontent.com/u/2463526?v=3","gravatar_id":"","url":"https://api.github.com/users/gscshoyru","html_url":"https://github.com/gscshoyru","followers_url":"https://api.github.com/users/gscshoyru/followers","following_url":"https://api.github.com/users/gscshoyru/following{/other_user}","gists_url":"https://api.github.com/users/gscshoyru/gists{/gist_id}","starred_url":"https://api.github.com/users/gscshoyru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gscshoyru/subscriptions","organizations_url":"https://api.github.com/users/gscshoyru/orgs","repos_url":"https://api.github.com/users/gscshoyru/repos","events_url":"https://api.github.com/users/gscshoyru/events{/privacy}","received_events_url":"https://api.github.com/users/gscshoyru/received_events","type":"User","site_admin":false},"created_at":"2017-02-06T22:35:02Z","updated_at":"2017-02-06T22:35:02Z","body":"So this is not nearly as straightforward as it seems. \r\n\r\nFirst of all, the change that introduced this problem has been met with... a certain amount of backlash. It seems we're not the only people who've had this broken. See https://github.com/DefinitelyTyped/DefinitelyTyped/pull/14284 . \r\n\r\nSecond of all, it doesn't make sense for us to type the renderer this way. If we do, it implies that we're ok with a renderer function that sometimes returns null. But we are not. Our code breaks if the cell renderer returns things that are not Cells; that don't have the right set of props for us to set. We could do lots of null checks and make empty cells if we get nulls back, but it makes far more sense to enforce that we get a Cell back from the renderer with typings, here. \r\n\r\nUntil typescript/definitelytyped figures out the right way forward here, I would suggest against using the most recent typings here -- or cast instead. We'll keep an eye on the discussion, and make sure to update our code/typings properly, as necessary, once this is resolved."}}
{"actor":{"display_login":"gscshoyru"}}