How to disable adding new rows/cols in handsontable?

To disable adding new rows/columns, set the following options:

minSpareRows: 0,
minSpareCols: 0

If you are using a context menu, you can disable the functionality with:

contextMenu: ["undo", "redo"]

Another option could be to set maxRows to the number of rows in your data and maxCols to the number of columns in your data. Note: if you are using the columns option, maxCols will be ignored.

maxRows: data.numberOfRows,
maxCols: data.numberOfColumns

I have tried

minSpareRows: 0,
minSpareCols: 0

But no luck :(.

Finally, I tried something like the following:

afterCreateRow: function (index, numberOfRows) {
                    data.splice(index, numberOfRows);
                }

It did the work :)


Use below options , this works for me..

fillHandle: {
      direction: 'vertical',
      autoInsertRow: false,
    }