AmpersandJS / ampersand-filtered-subcollection

Filterable, sortable, proxy of a collection that behaves like a collection.
MIT License
11 stars 7 forks source link

Run filters after collection has been synced #19

Closed herkyl closed 9 years ago

herkyl commented 9 years ago

Right now when fetching more collection data from server the subcollection doesn't update itself, this fixes it.

I don't think there is any good way to test this without mocking the fetch function of ampersand-rest-collection. If there is such a module let me know and I will create a test for it.

latentflip commented 9 years ago

Hey @herkyl

From looking at ampersand-collection-rest-mixin's fetch function, it looks like on fetch it will either do a set or a reset, which should trigger add/remove/reset events, which filtered-subcollection is listening for. So what is it in your app that's not working right now, as to my eye I think everything should be covered already?

I may well be mistaken though :)

herkyl commented 9 years ago

I will test this some more and get back to you

latentflip commented 9 years ago

Thanks!

herkyl commented 9 years ago

Ok, I created an example http://requirebin.com/?gist=05d2b52690a1b71909bd

It seems you are right, it has somehow to do with my specific use case. I will close this for now.