Closed yanickrochon closed 8 years ago
If I understand correctly, I think you just need to update the terms
as well with the properties you want to filter by. If the terms don't change, then the data you receive from the server won't change either.
Yeah, I finally got it, looking at the sources of ListContainer
, I saw that terms
and selector
is quite different. I based myself on other pagination plugins as well, and got it to work. It would perhaps be appropriate to specify that selector
is a client-side filter, whereas terms.*
is the server-side data, and an example may be given to illustrate server-side filtering..
Yeah, sorry it's not clearer. If it helps, Telescope uses ListContainer
quite a bit: https://github.com/TelescopeJS/Telescope/search?utf8=%E2%9C%93&q=ListContainer
I was expecting the
selector
props to fetch new data on change, however this is not the case.For example, I use this to render a list of inventory items :
Where the
selector
state may look like this :{ sku: 'foo' }
when filtering, or{}
if no filters. However, theterms
received on the subscription method is{ options: { limit: 10 } }
.What is the proper way to search (filter) a collection, and can this be added in the documentation? If it is already documented, where is it?