Re-indexing $row for Tabular Form
Re-indexing $row for Tabular Form

When removing an entry in Tabular Form (via JS) the $row array will not be re-indexed, resulting in missing indexes i.e. [1] => 'London', [3] => 'Paris', [4] => 'New York'.  
When adding entries in this state Tabular Form will not add entries at the end of the list, but add entries in the middle of the list and eventually overwrite existing entries. Strange behaviour, I know. 
So it is necessary to re-index $row after each removal. We cannot know if entries where removed by JS at this point in the controller, so $row gets re-indexed every time before adding another entry.
Works perfect. Tested it in my code.
mootensai/yii2-enhanced-gii