Details
Description
I have a ContactModel with this UnionFilter as its 'filter' property:
filter: UnionFilter {
DetailFilter
DetailFilter
{ id: lastNameDetailFilter detail: ContactDetail.Name field: Name.LastName value: "b" matchFlags: DetailFilter.MatchStartsWith }}
Instead of returning contacts whose first name starts with an 'a' and last name with a 'b', this returns all the contacts. In fact, when I use a UnionFilter with only one DetailFilter, eg the firstNameDetailFilter, it still returns all the contacts. The only scenario where I'm able to filter contacts is if i set the filter property to a single DetailFilter, as below:
filter: DetailFilter
{ id: firstNameDetailFilter detail: ContactDetail.Name field: Name.FirstName value: "a" matchFlags: DetailFilter.MatchStartsWith }In case you are wondering why I have Id's in there, it's so that I can be able to update the filter with dynamic values, like so:
/some parent's property/
property alias firstNameFilter : firstNameDetailFilter.value
/then as required/
firstNameFilter = "some search value"
Also, this only works with a single DetailFilter.