Table sorting with index assignment

I have an array of objects: I use it as a model for a buefy table and at the same time, I’m using the extension sortable.js to manually order the table rows: The table is rendered correctly, but I need to update the order parameter on each manually sorting to reflect the real order o the table. For example, I need to move the fifth row to the beginning of the table, so its order parameter should be 1 and the rest of the rows need to reflect 2, 3, 4 and 5. As you can see in the code,