I have a custom dropdown component in each header cell of ngx-datatable.But when I click at that dropdown then it is going inside ngx-datatable body.How can I add custom dropdown so that its popup will come on the top.
See original GitHub issueI’m submitting a … (check one with “x”)
[ ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter
Current behavior
I have custom dropdown component in each header cell of ngx-datatable. But when I click at dropdown the it is going inside ngx-datatable body. I tried with three or four dropdown.
Expected behavior I have custom dropdown component in each header cell of ngx-datatable. But when I click at dropdown the it is going then it should disply that dropdown.
Reproduction of the problem
<div> <ngx-datatable style="height:calc(100vh - 255px);" class='material' [rows]='activeTabData | filtermanual:propKey:propValue | orderBy : {property: column, direction: direction}' [columnMode]="'force'" [headerHeight]="height" [rowHeight]="getRowHeight" [scrollbarV]="true" [scrollbarH]="true" [loadingIndicator]="loadingIndicator" [rowClass]="getRowClass" (page)="onPage($event)"> <div> <ngx-datatable-column [width]="50" [frozenLeft]="true"> <ng-template let-row="row" let-value="value" ngx-datatable-cell-template > </ng-template> </ngx-datatable-column> <ul>
<li *ngFor="let col of tableKeys; let i=index; let last = last" >
<ngx-datatable-column name={{col}} width="230" [resizeable]="true">
<ng-template let-column="column" ngx-datatable-header-template >
<!--<select class="draggable" style="z-index:1000">
<option value="volvo">{{value}}</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</select> -->
<div style="width:150px">
<angular2-multiselect [data]="dropdownList" [(ngModel)]="selectedItems"
[settings]="dropdownSettings"
(onSelect)="onItemSelect($event)"
(onDeSelect)="OnItemDeSelect($event)"
(onSelectAll)="onSelectAll($event)"
(onDeSelectAll)="onDeSelectAll($event)"></angular2-multiselect>
</div>
</ng-template>
<ng-template let-row="row" let-value="value" ngx-datatable-cell-template >
{{row[col]}}
</ng-template>
</ngx-datatable-column>
</li>
</ul>
</div>
</ngx-datatable>
</div>
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
- Table version: 0.8.x
- Angular version: 4.0.0 Typescript version:2.4.0
- 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 ]
- Language: [all | TypeScript X.X | ES6/7 | ES5]
Issue Analytics
- State:
- Created 6 years ago
- Comments:24 (8 by maintainers)
Top Results From Across the Web
I have a custom dropdown component in each header cell of ...
But when I click at dropdown the it is going inside ngx-datatable body. How can I fix the issue please help me. I...
Read more >I have a custom dropdown component in each header cell of ...
But when I click at that dropdown then it is going inside ngx-datatable body.How can I add custom dropdown so that its popup...
Read more >swimlane/ngx-datatable - Gitter
I have a custom component for in one column. The row data is fetched from an API every 60s. The problem is, whenever...
Read more >Data tables - Material Design
Dropdown menus are used in the pagination section of the table to allow selection of rows-per-page. Progress indicator appears under the header row...
Read more >How To Use Ngx-Datatable To Show The Data In Grid View ...
In this article, we will learn how to show data in a list using ngx-datatable in Angular 8. It is available in the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @mohittripathi ! I was having the same problem! Dtry put that in your css:
.datatable-header-cell, .datatable-header { overflow:visible !important;
} .datatable-row-center{ z-index:11; }
I found this solution (may help somebody):
use @ng-select/ng-select
and add attribute: appendTo=“body”, example:
No need any other z-index configurations.