Is there a way to enable the multi-select widget to filter more than one field?
Let's say we want to filter data like the following:
var
data = [
{
name:
"ABC"
,
city:
"City1"
,
id: 123
},
{
name:
"DEF"
,
city:
"City2"
,
id:456
}
];
The dataTextField is "id" as well as the dataValueField:
$scope.selectOptions = {
dataTextField:
"id"
,
dataValueField:
"id"
,
valuePrimitive:
true
,
autoBind:
false
,
tagMode:
"single"
,
filter:
"contains"
,
filtering:
function
(e) {
// magic here?
}
},
dataSource: {
transport: {
read:
function
(options) {
//get data
});
}
}
}
};
How can I achieve that the multi-select suggestions show all items which field values contain the letter "D"?