Closed dineshmaths1 closed 4 years ago
public requestAutocompleteItems = (text: string): Observable<Object[]> => { this.members_response=[]; let p = { firstName: text, lastName: text, email: text }; return this._searchService.application(p).map( data => { let r=[]; this.members_response=[]; if (!_.isEmpty(this._global.getVal(data, 'response.docs', ''))) { let result = this._global.getVal(data, 'response.docs', ''); for (let s in result) { r.push({ email: result[s]["email"], id: result[s]["id"] }); //this.members_response.push({ email: result[s]["email"], id: result[s]["id"] }); } } console.log(r,JSON.stringify(r),text); return r; }); };
<tag-input (onAdd)="memberInvitieesCount($event)" (onRemove)="memberInvitieesCount($event)" [placeholder]="''" [secondaryPlaceholder]="''" formControlName="invitees" theme='bootstrap' [(ngModel)]="invitees"> <tag-input-dropdown [showDropdownIfEmpty]="true" [displayBy]="'email'" [identifyBy]="'id'" [autocompleteObservable]="requestAutocompleteItems" > <ng-template let-item="item" let-index="index"> {{item|json}} ({{ index }}) {{ item.email }} </ng-template>
this my code I have one data Array [ {…} ] [{"email":"xxxxx@GMAIL.COM","id":"b2dacdd9-7953-31b3-9c46-dda8300b6a42"}] But its not displaying on dropdown
this my code I have one data Array [ {…} ] [{"email":"xxxxx@GMAIL.COM","id":"b2dacdd9-7953-31b3-9c46-dda8300b6a42"}] But its not displaying on dropdown