Dropdown not closing when tag is created by enter
See original GitHub issueI’m submitting a … (check one with “x”)
[ ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[x] support request/question
Current behavior I’m using the latest published ngx-chips. I insert the html and js exactly as shown in the demo folder in the autocomplete example:
<div>
<h3>Tags within an autocomplete component</h3>
<tag-input [ngModel]="['@item']"
[addOnBlur]="true"
[clearOnBlur]="true">
<tag-input-dropdown [autocompleteItems]="autocompleteItems">
</tag-input-dropdown>
</tag-input>
</div>
autocompleteItems = ['Item1', 'item2', 'item3'];
When i enter a string in the tag-input control, the dropdown opens as expected. If i then hit enter to create the tag, or if i finish typing and hit enter (without selecting anything in the dropdown), then the dropdown stays open.
Note: This does not happen on the demo page (http://www.buompris.co/ng2-tag-input/). So my bug report is more a question as to if something has changed that would result in the behaviour of the dropdown only closing if something is selected by mouse. The other possibility is of course that something is wrong with my setup.
Expected behavior The dropdown is expected to close when a tag is created.
Minimal reproduction of the problem with instructions (if applicable) See code provided above.
What is the motivation / use case for changing the behavior? (if applicable) n/a
What do you use to build your app? (SystemJS, Webpack, angular-cli, etc.). Please specify the version angular-cli 1.1.3
Angular version: angular 4
ng2-tag-input version: Most recent published version of ngx-chips
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ] all
Thank you for an otherwise excellent component!
Best regards, Christian
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (5 by maintainers)
Hi @anafreitas, try version 1.4.5, it should fix your issue
@Gbuomprisco It worked, thanks!