json-api-store icon indicating copy to clipboard operation
json-api-store copied to clipboard

Please add refeshAll function

Open Big-Shark opened this issue 9 years ago • 0 comments

Hello, I have a problem, I created page and added button for loading and refresh my orders, but this is did not work.

If some body close order between my refresh, I saw it after refresh.

I wrote this script

store.load All('orders', {}).subscribe(function (orders) { 
   console.log(orders);
});

First time me server return 3 orders, and second time me server return 2 orders (1 is closed) but I sow 3 objects in console, because you don't removed object in collection, only added.

I think you should add new function, for refresh all collection. remove dont exist object and add new object

Also, I think you should add remove object for subscription, because we need refresh all views after delete, instead of remove one element in view

Big-Shark avatar Feb 26 '16 16:02 Big-Shark