Search code examples
angular6ngx-datatableangular-ngselect

ng-select inside ngx-datatable dropdown is not visible


(I reproduced my issue here: https://plnkr.co/QvEWjhJhbsghy1OD)

The <ng-select> drop down list of options is not displayed "over' the <ngx-datatable> row, it seems cut by the cell's height, making it pretty useless.

cut off ng-select

A regular <select> works fine though, I can see all options.

working regular select

How can I make the ng-select works as expected?


Solution

  • The solution is to use the ng-select attribute appendTo="body" as following:

    <ng-select [searchable]="false" placeholder="-- choose --" appendTo="body">
       <ng-option>Option 1</ng-option>
       ...