Search code examples
angular-ngselect

How to remove ng-select-top in @ng-select/ng-select module


How to remove ng-select-top in @ng-select/ng-select module

Disable top dropdown in @ng-select/ng-select module

I want to show the only bottom dropdown in @ng-select/ng-select module


Solution

  • Add dropdownPosition="bottom" this props your ng-select selector tag

    For ex:

    <ng-select dropdownPosition="bottom" #summarySearch bindLabel="name" [loading]="typeaheadSearchStatus === 'loading'" (change)="filter()" clearable="true" formControlName="accounts" (focus)="onTypeAheadFocus()" (blur)="onTypeAheadBlur()" [items]="searchList" [markFirst]="false" [multiple]="true" [(ngModel)]="searchModel" typeToSearchText="{{ localeStrings.typeToSearchText }}" placeholder="{{ localeStrings.searchFor }}" (search)="searchBy('searchText',$event)" [typeahead]="typeaheadSearch"> <ng-template ng-label-tmp let-item="item" let-clear="clear"> <span class="search-tag"> <span>{{item.name}}</span> <span (click)="clear(item)">&times;</span> </span> </ng-template> </ng-select>