Closed JeanOliveiraGomes closed 5 years ago
The search function is simple. If you require more complex search, you should write your own implementation and pass it down with the property [matchingFn]
I was using autocompleteObservable, the search is done at the backend side with a more complex logic, so every data that is returned should appear at dropdown.
I've created this function and worked:
matchingFn(value: string, target: TagModel) {
return true;
}
// html
<tag-input-dropdown [matchingFn]="matchingFn"....
I have a search for the string "name of the person",. Im using a regex to be able to find this result by typing " nam f person" or "person n" etc... for me the position need to be irrelevent. I make the request e get the data normaly, but the dropdown only shows when the string is in the sequence.
for exemple if a search for "name of" it works fine. but if i search by "name p" i get my data but the dropdown do not appear