I want to make the afterRender hook fired only by the render method, is there only way to solve it, my code like this
var m = function() {};
var flag = 0;
var hotSettings = {
afterRender() {
if (!flag) {
return
}
m() // triger multiple times
flag = 0;
}
};
var hotInstance = new Handsontable(document.getElementById(id), hotSettings);
flag = 1;
hotInstance.setCellMeta(row, col, 'className', cell.className);
hotInstance.render();
I am sorry for keeping you waiting,
Have you already made a progress on that task?
solved it, I changed my method. But I meet some other problem.
that I want to use formulas plugin,but I found it cant sum correctly, for Example I copy/paste data from excel, and the data with comma. in this situation it can’t sum correctly.
now, My solution is that I change the number with comma into normal number in the beforePaste hook,but it shows the normal number, however i want to show number with comma. that means custom render in certain cells, not column or row
Can you share a demo with the recent progress and input/output data? I’ll check if there is something we can do about it.
I am sorry but formulas do not support formatting yet. That is why the cell B4 is shown as 3
instead of 3,000
. You’d need to use a custom renderer to show it as 3,000