Hey @TipLister I appreciate the video! I actually have this part all done!
What we are running into more specifically is when we move a list item down it overlaps with another.
For example -
5 list items.
Position
1,2,3,4,5
I want list item 3 to be in position 2.
So the button is clicked to move the cell down.
now our database is
1,2,2,4,5
so when the page is reloaded the list loads weird. This gets really bad when things get moved around a lot.
You can end up with stuff like 1,1,1,3,5 or other crazy combinations. So the positions need to save ALL around not just the current cell.
We tried adding an action so the flow is:
Make changes to - “current cells” - “position” + or - 1
Make changes to a list of things - “current page (datatype)” - “position” - Current cell index
But realized it just over saved the current cell position rather than pulling each cells index.
also tried this flow:
Make changes to - “current cells” - “position” + or - 1
Make changes to a list of things - “current page (datatype)” - “position” - + or - 1
Make changes to - “current cells” - “position” + or - 1
So it counter weights so it would do (moving down)
1,2,3,4,5
ACTION 1:
3 turns to 2
so now you have
1,2,2,3,4
ACTION 2:
They all - 1
so now you have
0,1,1,3,4
ACTION 3
+1 of current cell
so you get
0,1,2,3,4
But when things get moved up and down a lot you can get very crazy numbers and negatives which is just sloppy in the DB and UI