{"action":"created","issue":{"url":"https://api.github.com/repos/handsontable/handsontable/issues/2512","labels_url":"https://api.github.com/repos/handsontable/handsontable/issues/2512/labels{/name}","comments_url":"https://api.github.com/repos/handsontable/handsontable/issues/2512/comments","events_url":"https://api.github.com/repos/handsontable/handsontable/issues/2512/events","html_url":"https://github.com/handsontable/handsontable/issues/2512","id":82000509,"number":2512,"title":"Example in the docs throws an error","user":{"login":"realtebo","id":1268699,"avatar_url":"https://avatars.githubusercontent.com/u/1268699?v=3","gravatar_id":"","url":"https://api.github.com/users/realtebo","html_url":"https://github.com/realtebo","followers_url":"https://api.github.com/users/realtebo/followers","following_url":"https://api.github.com/users/realtebo/following{/other_user}","gists_url":"https://api.github.com/users/realtebo/gists{/gist_id}","starred_url":"https://api.github.com/users/realtebo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realtebo/subscriptions","organizations_url":"https://api.github.com/users/realtebo/orgs","repos_url":"https://api.github.com/users/realtebo/repos","events_url":"https://api.github.com/users/realtebo/events{/privacy}","received_events_url":"https://api.github.com/users/realtebo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-28T15:58:39Z","updated_at":"2015-05-29T08:08:15Z","closed_at":null,"body":"I'am in this page: http://docs.handsontable.com/0.15.0-beta3/demo-custom-renderers.html#page-header at the subtitle _Changing cell type from a dropdown menu in cell header_ \r\n\r\nWatch at the example code into this function\r\n\r\n    afterGetColHeader: function (col, TH) {\r\n    ....\r\n    menu = buildMenu(columns[col].type)\r\n\r\nWhen the execution reaches `buildMenu(...)` it generates an error. This is caused because for some reason I don't know, and _I suppose it's a bug_, the `col` value is set to `-1`. Of course, it's not possible that we have an index like this.\r\n\r\nThis error is demostrated in this jsFiddle: http://jsfiddle.net/realtebo/wru8bjcv/ \r\n\r\nHere you can see the `console.log (col)`. \r\nOf course you'll see in your console that sequence, (repeated some times !)\r\n\r\n    1\r\n    0\r\n    -1\r\n\r\nThis fiddle is not the example's full code, but it's enough to prove that the example is not working due to a call with `col` set as `-1`. \r\n\r\nalso: the `console.log` shows a LOT of call to the function `afterGetColHeader` and I think it's not a good thing"},"comment":{"url":"https://api.github.com/repos/handsontable/handsontable/issues/comments/106737260","html_url":"https://github.com/handsontable/handsontable/issues/2512#issuecomment-106737260","issue_url":"https://api.github.com/repos/handsontable/handsontable/issues/2512","id":106737260,"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":"2015-05-29T08:08:15Z","updated_at":"2015-05-29T08:08:15Z","body":"Hi @realtebo it is intentional. Dataset is started with 0,0 so col has to have `-1` Please see the [example](https://jsfiddle.net/wru8bjcv/1/)"}}