Ranges...?
chx opened this issue · comments
How did you do the Price slider in https://raw.githubusercontent.com/itemsapi/itemsjs/master/assets/electronics_search_demo.gif ?
I am powering my little ThinkPad Search https://chx.github.io it filters 80 ThinkPad models with itemsjs, thanks for the library it's really helpful. It'd be even more awesome if I had sliders.
Hi @chx
That particular slider was created with the use of https://github.com/unplatform-io/instantsearch-itemsjs-adapter.
However, you do not necessarily need it. You can also create your own slider and use the slider values is in filter
function like this:
var result = itemsjs.search({
query: 'shoes',
filter: function(item) {
return item.rating >= 8 && item.reviews_count >= 200;
}
});
https://github.com/itemsapi/itemsjs/blob/master/docs/configuration.md#searching
Hope this helps, goodluck!