This looks like this has been a bug forever, or is it just misunderstood? Even setting this, it does not prevent adding new rows.
fillHandle={{
direction: "vertical",
autoInsertRow: false,
}}
This looks like this has been a bug forever, or is it just misunderstood? Even setting this, it does not prevent adding new rows.
fillHandle={{
direction: "vertical",
autoInsertRow: false,
}}
Sorry for delay. We should be able to answer the question with a demo early next week.
The autoIndertRow
relates to the behavior of the fillhandle/autofill. So it will not create new rows when we autofill.
Demo Handsontable example - JSFiddle - Code Playground
When we set the autoInsertRow
to true
- we can add new rows by autofilling the value
When we set the autoInsertRow
to false
- we cannot add new rows by autofilling the value
This is also how it works in your demo. I cannot autofill the data so it add more rows that the already 100 that were defined.
Please tell me what is the exact requirement that you have.
Ah thanks for the response, I thought this applied to copy/paste as well after selecting many rows. Looking for a similar option to not create new rows on copy paste.
The easiest way to limit the amount of rows entirely is to use the maxRows
option (it can be altered via updateSettings()
method if you’d like to change it along the way).
Here’s a demo Handsontable example - JSFiddle - Code Playground. We have maxRows
set up to 10
. Now, user cannot autofill to add rows, if they paste data it is cut to fit the last row. Also, when you allow to add rows via context-menu user will have the option grayed out if there are already 10 rows in the grid.
Great, thanks. Although I highly encourage an option called “disableAddRows” or similar.