Gbuomprisco / ngx-chips

Tag Input component for Angular
MIT License
903 stars 359 forks source link

click on option in tag-input-dropdown and separate chips using ENTER, gives runtime error #947

Open Warsha97 opened 4 years ago

Warsha97 commented 4 years ago

PLEASE MAKE SURE THAT:

I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] support request/question

Notice: feature requests will be ignored, submit a PR if you'd like

Current behavior

1.when trying to add a new chip by 'Enter', it is not happening, and gives a runtime error as following=> ReferenceError: regeneratorRuntime is not defined at TagInputComponent.onFormSubmit

(when i specify [separatorKeyCodes] for other keys, it works. but even if i specify [separatorKeyCodes]="[13]" it produces the same outcome as above)

2.when selecting an item from tag-input-dropdown gives runtime error ReferenceError: regeneratorRuntime is not defined at TagInputDropdown.requestAdding

Expected behavior

1.should be able to use 'enter' to add new chip 2.dropdown selection should work.

Minimal reproduction of the problem with instructions (if applicable)

<tag-input [ngModel]="['@item']" (onAdd)="onAdded($event)">
                <tag-input-dropdown [autocompleteItems]="['iTem1', 'item2', 'item3']" [focusFirstElement]="true"
                    [showDropdownIfEmpty]="true" [dynamicUpdate]="true" [appendToBody]="false">
                </tag-input-dropdown>
            </tag-input>

What do you use to build your app?. Please specify the version "@angular/cli": "~8.3.20",

Angular version:

"@angular/animations": "~8.2.14", "@angular/cdk": "^8.0.1", "@angular/common": "~8.2.14", "@angular/compiler": "~8.2.14", "@angular/core": "~8.2.14", "@angular/forms": "~8.2.14", "@angular/material": "^8.0.2", "@angular/platform-browser": "~8.2.14",

ngx-chips version: "ngx-chips": "^2.1.0",

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 ]

Chrome