ngx-chips icon indicating copy to clipboard operation
ngx-chips copied to clipboard

Input NOT Reset When Typing a Tag Fast and Press Separator Key

Open firstor opened this issue 6 years ago • 3 comments

Current behavior Currently when you type any tag very fast and then press separator key, new tag is appended, but the input field text still remains. image

Expected behavior The text new should be cleared after new tag is appended.

Minimal reproduction of the problem with instructions (if applicable) Here is my usecase of tag-input

<tag-input class="tag-input" #tagInputCtrl
           theme="my-custom-theme"
           identifyBy="name"
           displayBy="name"
           maxItems="25"
           onlyFromAutocomplete="false"
           separatorKeys=" " <!-- space is my separator key -->
           ...>
    <tag-input-dropdown [autocompleteObservable]="requestTagItems"
                        showDropdownIfEmpty="false"
                        minimumTextLength="1"
                        appendToBody="false"
                        zIndex="9999"
                        identifyBy="name"
                        displayBy="name"
                        [matchingFn]="dropdownMatchFn">
    </tag-input-dropdown>
</tag-input>
  • click tag-input to set focus on it
  • type new and press space very fast
  • => then new tag is appended, but text new still remains

What do you use to build your app?. Please specify the version

  • angular-cli v6.1.1
  • @angular-devkit/build-angular v0.7.4
  • webpack v4.9.2

Angular version:

  • Angular v6.1.1

ngx-chips version:

  • ngx-chips v1.9.7

Browser:

  • Google Chrome v69.0.3497.100 (Official Build) (64-bit)

firstor avatar Sep 21 '18 09:09 firstor

Hi, does it only happen with a separator key?

Gbuomprisco avatar Sep 22 '18 08:09 Gbuomprisco

@Gbuomprisco Not sure, but I confirm it happens with a separator key.

firstor avatar Sep 22 '18 08:09 firstor

Hello, I've had the same problem and my solution was typing html part in template in component.ts file!)

genryeiter avatar May 20 '20 13:05 genryeiter