2017-08-11 56 views
0
I am creating my own template filter in primeNg Datatable. It working 
without any issue. 
But when I use the same template on virtual scroll it is being cut buy table 
body. Not visible. I tried multiple hit and trial but no luck. 

我加<template pTemplate = "body">``<template pTemplate = "header">PrimeNg中的vritual卷軸的自定義過濾器模板不可見?

but none of them working i tried all possble CSS as well. 
Please see the plunk without virtual and with virtual scroll: 

Plunk without virtual scroll事業部可見

Plunk with virtual scroll股利不可見

+0

忘了補充:看問題,請點擊過濾器圖標,在第一coloumn。 –

回答

0
Some how i manage to solve this issue. Using position fixed and z-index: 1 
I have added z-index because in real app it was behind the table rows. 
plunker is updated now with sol. 

<div *ngIf='showDiv' style=" width: 150px; height: 200px; 
 
         position:fixed; 
 
         z-index: 1; 
 
         border:1px solid grey; 
 
         overflow: visible; 
 
         background-color: ghostwhite;">

updated plunk工作

+0

希望這會幫助別人創建自己的自定義過濾器框。如果有人有更好的替代解決方案,請張貼您的答案 –