I'm trying to make a grid with custom rows by passing a custom vue row component to the :row-render prop like so:
Lsjacl (forked) - StackBlitz
However there's a problem when I'm inserting new rows at the top. It seems the row that's newly created re-uses the row data from the row below it instead of the completely blank data a new row starts out with. When I insert a row at the bottom of the list this problem doesn't occur and the values are all completely blank.
You can reproduce this issue with the following steps:
1: open the stackblitz.
2: click on 'add row to end'.
3: see that there's a newly created row at the bottom of the list.
4: in the field meta it says the initalValue is null
5: now add a row to the beginning of the list with the 'add row to beginning' button
6: The field meta says it's initialValue is 'Lemon' the same value as the row below it.
I'm figuring this has something to do with the loop that's generating all rows using generic indexes instead of unique ID's as described in this video:
https://youtu.be/-6fO2qUmf7I?t=412
Is there a way to fix this so I can insert the row at the beginning of the list and have it start out as a completely fresh vue component?