minSparerows with column set to readonly: true

Tags: #<Tag:0x00007efc64497958>

Hello
I’ve been developing with HOT for a while and notice this…
When I set the options of the Hot to minSpareRows: 1,… but the column is read only, the table stills creates an additional row… the case is a table that eventhough has a spareRow,… it can only be created if data is inserted into an specific column,… not the others.

do I have to cancel the row creation event at beforeCreateRow ? is this a default behaviour that the spare row does not get affected by the cell properties set on the Hot instantiation ?

thanks in advanced

Hi @adonisbriceno

Can you please share a code example in jsfiddle so we can understand your case better?

please see this:
Edit fiddle - JSFiddle - Code Playground

the minSpareRow if you click on any cell of the readOnly columns and hit enter the HOT will create a new line

HI @adonisbriceno

Thank you for the code sample. We created the workaround for your issue that you can find here. This solution blocks the keyDown event on ENTER key to prevent adding new rows while clicking on disabled columns.

https://jsfiddle.net/aszymanski/19jgz63k/1/

However, when you click outside the disabled columns minSpareRow will still create an additional row below those columns.

I understand that you expect that new rows should be created only below enabled columns, am I right?

1 Like

Hi @adonisbriceno

Any updates here, can I close the topic?

Hi Adrian… yes you can close it,… I teste this and it works fine,… thank you

That’s great to hear!