Handsontable performance Issue

Tags: #<Tag:0x00007f8b1db1f170>

Hi Team, We have created a table from handsontable in angular. We have 5 columns and 50 rows. Data headers are the first columns and data rendering to be done row-wise.
We have used settings and cells to describe the data-type of each cell.

cells: function (row, col) {
var cp = { type: ‘numeric’};
if (row === 0 || row === 2) {
cp.type = ‘text’
}
else if (row === 1) {
cp.type = ‘checkbox’;
}
return cp;
},

This is actually calling multiple times. And making the performance worse, especially in the editing mode.
Please help to resolve the issue.

Attaching the screenshot :

Hi @manasa.r

That is correct. The cells method is called with each render. But in your case, defining the

type: ‘numeric’

on the global level (not in the cells) should improve the performance.

Code after changes

type: ‘numeric’,
cells: function (row, col) {
var cp = {};
if (row === 0 || row === 2) {
cp.type = ‘text’
}
else if (row === 1) {
cp.type = ‘checkbox’;
}
return cp;
},