ngx-bootstrap
ngx-bootstrap copied to clipboard
feat(typeahead): support multiple search field values
I am trying to use typeahead in a scenario where we need to filter the search result based on multiple fields. Lets say we have an object like this
[{
id: 1
name: "Stockholm",
country: "Sweden"
}, {
id: 1
name: "Gothenburg",
country: "Sweden"
}]
Then if I search on "Stock" I want the Stockholm object as result. If I search for "Swe" I want both Stockholm and Gothenburg. The matching function should therefore look for a match on both the name and country property.