Open levacic opened 9 years ago
Maybe the search/sort "field" options can be generalized to take a function to map each item, for example
search('bar', fields: [
function(item, term) {
return item.tags.indexOf(item) >= 0;
},
'title'
]);
or
search('bar', fields: [
function(item) {
return item.tags.join('_');
},
'title'
]);
It would be great to have the ability to search the data based on the
tags
property. It's possible to hack this up in user-code by concatenating thetags
property into a string, with a unique imploding character, e.g....and search through that transformed data instead, but this is neither a clean nor a stable solution.