Gbuomprisco / ngx-chips

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

onAdding not being called #857

Closed HDaghash closed 5 years ago

HDaghash commented 5 years ago

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

(onAdding) not being called the function

Expected behavior

should call the interceptor function as mentioned in docs

Minimal reproduction of the problem with instructions (if applicable)

html

(onTextChange)="getTags($event)"
        (onAdd)="onAdd($event)"
        (onAdding)="onAdding($event)"

component

 onAdding(tag: TagModel): Observable<TagModel> {
    console.log('tag here', tag);
    const confirm = window.confirm('Do you really want to add this tag?');
    return of(tag).pipe(filter(() => confirm));
  }

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

latest for 7

Angular version:

7

ngx-chips version:

2 beta 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 ]

HDaghash commented 5 years ago

please ignore it should be [onAdding] insteadof (onAdding), but in the doc it's defined as output not input