dropdown not showing whole respose on entering the keys with spaces
See original GitHub issueI’m submitting a … (check one with “x”)
[x] bug report
[ ] feature request
[ ] support request
Current behavior Issue 1: If I enter keys with spaces, auto dropdown is not showing the entire returned object as expected . I think the reason is that the text entered with the spaces are treating it as one key(ex: sun flower). but I need it to treat it as two different keys and dropdown should populate response from key of word “sun” and response from key of word “flower”. can you please help me out on fixing this issue.
Issue 2: I enter the text in search box, on hitting the Enter key, Text is getting cleared. Can you please suggest me on how to prevent the text not to get cleared on hitting the enter key. because I need the text to be displayed even after I get the results for the search I made through the text.
-
Angular version: 2.4.5
-
ng2-tag-input version: 1.0.0
-
Browser: IE 11
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (6 by maintainers)
@Gbuomprisco Can you please provide us a code example that implements the matchingFn input property.Because, i am wondering whether i have to remove autocompleteObservable property.
What I have done is I have added [matchingFn]= customFilter(value, requestAutocompleteItems)" in the tag-input-dropdown and calling customFilter in my local component by passing user searched text and ressponse from observable as second parameter. Can you please correct me if it’s wrong.
Any help would be highly appreciated…!
VERSIONS: Angular version: 2.4.5 ng2-tag-input version: 1.0.0 Browser: IE 11
Hi @ranouf,
There is pretty much a whole implementation here https://github.com/Gbuomprisco/ng2-tag-input/issues/188#issuecomment-279477395. Define it in your parent component and pass it down to tag-input-dropdown.
I see you defined
filter
, but you shouldn’t add parenthesis to it.What exactly is not clear?
(this is my own implementation instead, for reference: https://github.com/Gbuomprisco/ng2-tag-input/blob/master/modules/components/dropdown/tag-input-dropdown.component.ts#L90)