Angular 启用可滚动时,p-multiselect弹出窗口在Priming数据表中不可见;“真的”;

Angular 启用可滚动时,p-multiselect弹出窗口在Priming数据表中不可见;“真的”;,angular,webpack-2,typescript2.2,primeng-datatable,Angular,Webpack 2,Typescript2.2,Primeng Datatable,使用scrollable=“true”时,Priming p-multiselect筛选器弹出窗口在Priming datatable中不可见。 如果我删除scrollable=“true”,它在初始化数据表中工作正常。参考以下代码 .html 对不起,这是Priming我已经更改了标记Priming datatable是“缩小”我想你可以接触到少数Priming用户,使用Priming标记更好我认为问题已经解决了。在p-multiselect标记中使用appendTo=“body”它工作正常对

使用scrollable=“true”时,Priming p-multiselect筛选器弹出窗口在Priming datatable中不可见。 如果我删除scrollable=“true”,它在初始化数据表中工作正常。参考以下代码

.html


对不起,这是Priming我已经更改了标记Priming datatable是“缩小”我想你可以接触到少数Priming用户,使用Priming标记更好我认为问题已经解决了。在p-multiselect标记中使用appendTo=“body”它工作正常对不起,它是priming我已经更改了标记priming datatable是“缩小”我认为可以接触到少数priming用户,使用priming标记更好我认为问题已经解决。在p-multiselect标记中使用appendTo=“body”,效果良好
<p-dataTable [value]="cars" [rows]="10" [paginator]="true" [globalFilter]="gb" #dt scrollable="true" scrollHeight="200px" >
    <p-header>List of Cars</p-header>
    <p-column field="vin" header="Vin (startsWith)" [filter]="true" filterPlaceholder="Search"></p-column>
    <p-column field="year" header="Year ({{yearFilter||'No Filter'}}" [filter]="true" filterMatchMode="equals">
        <ng-template pTemplate="filter" let-col>
            <i class="fa fa-close" (click)="yearFilter=null;dt.filter(null,col.field,col.filterMatchMode)"></i>
            <p-slider [style]="{'width':'100%','margin-top':'8px'}" [(ngModel)]="yearFilter" [min]="1970" [max]="2010" (onSlideEnd)="dt.filter($event.value,col.field,col.filterMatchMode)"></p-slider>
        </ng-template>
    </p-column>
    <p-column field="brand" header="Brand (Custom)" [filter]="true" [style]="{'overflow':'visible'}" filterMatchMode="equals">
        <ng-template pTemplate="filter" let-col>
            <p-dropdown [options]="brands" [style]="{'width':'100%'}" (onChange)="dt.filter($event.value,col.field,col.filterMatchMode)" styleClass="ui-column-filter"></p-dropdown>
        </ng-template>
    </p-column>
    <p-column field="color" header="Color (Custom)" [filter]="true" filterMatchMode="in" [style]="{'overflow':'visible'}">
        <ng-template pTemplate="filter" let-col>
            <p-multiSelect [options]="colors" defaultLabel="All Colors" (onChange)="dt.filter($event.value,col.field,col.filterMatchMode)" styleClass="ui-column-filter"></p-multiSelect>
        </ng-template>
    </p-column>
</p-dataTable>
export class DataTableFilterDemo implements OnInit {

    cars: Car[];

    brands: SelectItem[];

    colors: SelectItem[];

    constructor(private carService: CarService) {}

    ngOnInit() {
        this.carService.getCarsMedium().then(cars => this.cars = cars);

        this.brands = [];
        this.brands.push({label: 'All Brands', value: null});
        this.brands.push({label: 'Audi', value: 'Audi'});
        this.brands.push({label: 'BMW', value: 'BMW'});
        this.brands.push({label: 'Fiat', value: 'Fiat'});
        this.brands.push({label: 'Honda', value: 'Honda'});
        this.brands.push({label: 'Jaguar', value: 'Jaguar'});
        this.brands.push({label: 'Mercedes', value: 'Mercedes'});
        this.brands.push({label: 'Renault', value: 'Renault'});
        this.brands.push({label: 'VW', value: 'VW'});
        this.brands.push({label: 'Volvo', value: 'Volvo'});

        this.colors = [];
        this.colors.push({label: 'White', value: 'White'});
        this.colors.push({label: 'Green', value: 'Green'});
        this.colors.push({label: 'Silver', value: 'Silver'});
        this.colors.push({label: 'Black', value: 'Black'});
        this.colors.push({label: 'Red', value: 'Red'});
        this.colors.push({label: 'Maroon', value: 'Maroon'});
        this.colors.push({label: 'Brown', value: 'Brown'});
        this.colors.push({label: 'Orange', value: 'Orange'});
        this.colors.push({label: 'Blue', value: 'Blue'});
    }
}