JsonRest seems to be designed to user rest-style urls (e.g. /path/keyword)
When used with FitleringSelect, the query is path/?searchAttr=keyword
Any way I can set FilteringSelect to pass just pass the keyword to the JsonRest store?
JsonRest seems to be designed to user rest-style urls (e.g. /path/keyword)
When used with FitleringSelect, the query is path/?searchAttr=keyword
Any way I can set FilteringSelect to pass just pass the keyword to the JsonRest store?
Copyright © 2021 Jogjafile Inc.
The FilteringSelect passes an object to the store/JsonRest as the query. This is automatically converted to a query string in
JsonRest.query()
. If you pass a string to the store's query method, then it is appended to the url. So a hacky solution is to modify the the query property of the FilteringSelect before it is passed to the store by monkey patching the_startSearch()
method, e.g.: