Closed Simon245 closed 5 years ago
@Simon245 I think you can get the desired behavior by adding [keepOpen]="false"
So your code would look like:
<tag-input-dropdown
[appendToBody]="true"
[showDropdownIfEmpty]="true"
[keepOpen]="false"
[autocompleteItems]="tagItems"
[identifyBy]="'id'"
[displayBy]="'title'">
</tag-input-dropdown>
@sarahtully Thank you so much, that works. I don't know why I didn't try that one, I guess I was happy with it opening again after adding a tag.
Thanks @sarahtully
PLEASE MAKE SURE THAT:
I'm submitting a ... (check one with "x")
Current behavior I am using a button to disable the chips input. When I enable the input with the button the autocomplete dropdown displays.
Expected behavior For the autocomplete dropdown to only display when clicking on the input.
Minimal reproduction of the problem with instructions (if applicable) https://stackblitz.com/edit/angular-ngx-chip-dropdown-test
Click on the button to enable/disable the tags
What do you use to build your app?. Please specify the version Angular CLI 6.1.5
Angular version: 6.1.0 on my project and 7.2.5 on stackblitz example
ngx-chips version: 1.9.8
Browser: [ Chrome Version 73.0.3683.103 ]