there must be a bug in the demo of
https://www.htmlelements.com/demos/grid/editing-add-row/
– I press “click here to add” (the above one)
– first name “aaa” and click “add”
– I see the correct data with the new inserted record on top
– I now click on the firstname “aaa”, change it to “bbb” and click somewhere else in the grid to let it update
– now the situation is
* the changed data is correct
* but also the second row of the grid (which initially was the first one, before I did the adding) has now been changed with the “bbb” in the first name
– from this moment on, all the changes I apply to the first record (i.e. the one I inserted before)
are always repeated to the second row (the contents of each field)
I wanted to add a similar logic to my project and came to a similar problem; so I think there must be something wrong with the internal index after inserting a new row