Thanks @aleksandra_budnik, I am not sure if there is an issue reported with the method “afterGetColHeader” in case manualColumnMove is enabled, as the column number received by this method does not correspond to the actual column been render, here is the problem:
hot1 = new Handsontable(table,{
data: Handsontable.helper.createSpreadsheetData(100, 5),
colWidths: 50,
colHeaders: function(col) {
return 'Col-' + col;
} ,
manualColumnMove: [1,2,3,4,0],
afterGetColHeader: function(col, TH) {
console.log('AfterCol', col, TH.innerHTML);
},
persistState: true,
rowHeaders: true,
dropdownMenu: true,
renderAllRows: true
}); });
Essentially, I would be expecting the line ‘console.log(‘AfterCol’, col, TH.innerHTML);’ prints:
AfterCol 0 <div class="relative"><button class="changeType"></button><span class="colHeader">Col-0</span></div>
But instead is printing this:
AfterCol 0 <div class="relative"><button class="changeType"></button><span class="colHeader">Col-1</span></div>
Here is a fiddle with the example:
http://jsfiddle.net/gvazq82/uoy7fduo/
Let me know if this is a known issue.