Angular NgbTypeaHead not showing list

Viewed 228

I have followed document and everything but in my project its not show dropdown list

.html

     <div class="col-md-6">
        <div class="form-group">
          <label class="form-control-label">Country</label>
          <input id="typeahead-basic" type="text" class="form-control"  [ngbTypeahead]="search"/>

        </div>

.ts

export class ManageDonationsComponent implements OnInit, OnDestroy, IDeactivateComponent {

  public model: any;

  search: OperatorFunction<string, readonly string[]> = (text$: Observable<string>) =>
    text$.pipe(
      debounceTime(200),
      distinctUntilChanged(),
      map(term => term.length < 2 ? []
        : states.filter(v => v.toLowerCase().indexOf(term.toLowerCase()) > -1).slice(0, 10))
    )
  }

I am using "@ng-bootstrap/ng-bootstrap": "^6.1.0"

Here is doc stackBlitz its working on this https://ng-bootstrap.github.io/stackblitzes/typeahead/basic/stackblitz.html

0 Answers
Related