Why does the Cells options/function run twice?

Tags: #<Tag:0x00007f0b0acb6940> #<Tag:0x00007f0b0acbc700>

Why does the “cells” option/function runs more than once? If you run the below, the console shows two lines. However, there is only 1 cell.

const data = [
    ['Sheet1 A1'],

const container = document.querySelector('#example1');
const hot = new Handsontable(container, {
    data: data,
    height: 'auto',
    cells(row, col) {
        // Why does the following run twice?
    licenseKey: 'non-commercial-and-evaluation',

Hi @ptownbro

Here’s Aleksandra from the Support team.

The cells method runs for all of the cells in the table with each table render. In some cases we get more calls because of data layers (width/height/fixedColumn and rows/column and row headers). In your case when we remove height: 'auto' we get only one call for the single cell in the grid.

Ok. Thank you. That answers my question.

Great. I will then close the thread.