Closed websiddu closed 1 year ago
Never mind, i was trying to add a proxy object directly, and when I convert the proxy to JS it worked fine.
Alright! Best to do sorting on a non-synced copy of the array indeed
And what's the recommended way to convert the proxied array to JS? array.slice(0)
?
you use lodash's copy function or just do JSON.parse(JSON.stringify(proxyObject))
@websiddu That seems pretty inefficient. Wouldn''t it make sense to add a method to the proxy which allows direct access to the underlying array (or similar)?
Also, maybe I am missing something, but as it is not possible to replace the array in the store, how can I change the sort order in the stored array permanently? Or is this not supported and I should rather add a position
property to each item instead?
I have an array in synced store and I wanted to sort
I'm using
I keep getting an error
Not supported: reassigning object that already occurs in the tree.