you have to save it as a list on a data

the way I normally do this is with intermediary states

get original list
send to custom event
get items above dropped group index
save as state
get items below dropped group index
save as state
get above list plus moved object merged with below list
save on data or state

often I’ll hold the reorder as a state until the user “saves” it with a button click - saves writing to the database frequently as users will shuffle rows regularly.

I also use 2 drop groups to better position whether the user dropped above or below the row and then highlight when dragged over to indicate whether it’ll go above or below.

another way to do it is to use a number on the data and just get the number above and below then divide in half and write the number on the data and then sort by the number. it’s messier but you don’t have to store a list on a data. I usually cleanup the numbers when the user clicks save if I use that method (otherwise you end up with a lot of decimals from the divisions)

1 Like