items-store icon indicating copy to clipboard operation
items-store copied to clipboard

Ability to use query selection in item retrieval

Open smirea opened this issue 9 years ago • 0 comments

Say I have an API that supports query filters (e.g. most notably for use in an autocomplete component). I am trying to fit that workflow into the items-store pipeline but I don't see any primitive method that supports passing it either an object to fetch by or an extra parameter

In other words, I would like to be able to do: stores.autocomplete.update({name:'foo'}) which would return a list of items, but this is not achievable since the readSingleItem method expects a string id always.

I know this can be bypassed by having a store with the route specifically set to /api?name= and then the ID of the item would basically be the query parameter (which works), but that limits me to having fixed URLs from the start and does not allow to build a query url as needed

smirea avatar Sep 05 '15 02:09 smirea