See the following http://jsbin.com/jelekuxoli/1/edit?html,js,output where I have two sortable lists. We can move items back and fourth and retain their order on refresh. If I move item between the groups the newly added item is not restored.
Is there a way to do this.
store - only to save/restore the order.
Everything else is not his area of responsibility.
I think this might be an issue.
I updated @graemegeorge's original fiddle so it outputs the order from store.set to the console to make it easier to see what's happening.
http://jsbin.com/getudar/edit?html,js,console,output
When you drag an item from Group A to Group B it will call store.set on Group A without any changes. Nothing is called on Group B
If you rearrange Group B (with the new item in it) it will call store.set with the new item.
If you rearrange Group A, it will call store.set as if it still has all the original items.
It's a bit inconsistent right now, but I think it should by adding and removing items from the store when they're moved between them.
Is that correct?
Hi,
here a working example, getting two list order to save.
http://jsbin.com/necabofika/1/edit?html,js,console,output
I change to 1.4.2 Sortable version.
I hope this help
In case anyone else comes across this and needs to solve it,
I managed to come up with a solution here which saves and restores across multiple list:
https://codesandbox.io/s/optimistic-dew-7mre4?file=/src/index.js
Not sure why it doesn't support storing position across different list by default, but oh well..
Most helpful comment
I think this might be an issue.
I updated @graemegeorge's original fiddle so it outputs the order from
store.setto the console to make it easier to see what's happening.http://jsbin.com/getudar/edit?html,js,console,output
When you drag an item from
Group AtoGroup Bit will callstore.setonGroup Awithout any changes. Nothing is called onGroup BIf you rearrange
Group B(with the new item in it) it will callstore.setwith the new item.If you rearrange
Group A, it will callstore.setas if it still has all the original items.It's a bit inconsistent right now, but I think it should by adding and removing items from the store when they're moved between them.
Is that correct?