Maybe this has been asked but I'm having trouble finding it. I already have a filter and I don't need a comma delimited filter. I want to search multiple "Strings" under the same filter. If the filter is say "DOGS", then I want to search multiple "types" of dogs under that filter, comma d,e,l,i,m,i,t,e,d.
Filter: [dogs]
Search String: "pugs, dachsunds, chahuahua, beagle"
Row Return:
1.) pugs
2.) dachsunds
3.) custom row (message:'no chahuahuas found')
4.) beagle
I can do the query on each value of the split(",") just fine but I need to return a row for each. So I need to search on one string, then search on another without clearing the previous row. This would produce the desired effect.
Thanks for any help. Below is some more context:
CURRENT SEARCH FUNCTION:
// Get Selected FilterType
function getSelectedFilters(){
return angular.element('.selected-filter').find(".selected").attr("filter-value");
}
//Search based on dynamic filter - onkeyup
angular.element('#SearchBox').keyup(function (e){
let searchString = e.target.value;
let filterType = getSelectedFilters();
angular.element('#Grid').data('kendoGrid').dataSource.query({
page:1, pageSize:20,
filter:{
logic:"or",
filters:[
{field:filterType, operator:"contains",value:searchString}
]
}
});
------------------------------------
where i need to be:
....each( stringArr, function( i, val ) {
angular.element('#Grid').data('kendoGrid').dataSource.query({
page:1, pageSize:20, filter:{
logic:"or",
filters:[
{field:filterType, operator:"contains",value:val[i]} ...
... (return row on first [i], then an additional row on [i++], etc ) ...