Can't delete first row, or add new row below it

Tags: #<Tag:0x00007f2495d74a18>

Here is an example with two tables: one has 1 initial row, and one has 2 initial rows.

The behavior I want is for the “+” button to add a row below or after the one clicked. To do this, my code is hot.alter("insert_row", endRow+1). This works for any row other than the first row. And the behavior is the same whether there is only a single row or more.

The “delete” button also does not work on the first row. I’m guessing the issue is the same.

Hi @ariel

The solution I found is pretty simple, all that you need to do is to not to check if the startRow exists. If you remove this condition then everything works as expected:

1 Like

That fixed it!

That’s great, I’m closing the topic then.