Is there a way to set the physical row index when inserting a new row? When calling:
alter(‘insert_row’, visualIndex)
the physical index is automatically set to the same value as the visual index. This causes issues when inserting new rows into a sorted or filtered view. For instance, say I have filtered a 10 row table down to rows 8, 9, and 10, and then I insert a row in between 8 and 9. The visual index in this case would be 1, but I would want the physical index to be 8 so that when I remove the filter, the new row is still in between the original rows 8 and 9. Instead, the new row will still show up as the second row in the unfiltered view, because the physical index is set to the same as the visual index.
I have not been able to find an API function that allows me to set or change a physical row index, and I’m hesitant to directly modify the source data structure in case that causes unintended problems.