Wednesday, 21 August 2019

How to fit p-dropdown inside of a table cell?

I'm adding p-dropdown to a p-table similar to what is seen here: https://www.primefaces.org/primeng/#/table/filter

The p-dropdown is overflowing into the next cell. How can I prevent p-dropdown from flow to the next cell?

I have tried the following:
- adding [style]="{'width':'100%'}" to p-dropdown element
- adding [autoWidth]="true" to the p-dropdown element
- adding max-width to the p-dropdown element

<p-table [columns]="cols" [value]="wfdata" [paginator]="true" [rows]="10">

...

<th *ngFor="let col of cols" [ngSwitch]="col.value">
          <p-dropdown *ngSwitchCase="'invoice_status'" 
                    [options]="statuses" 
                    [autoWidth]="true"
                    [style]="{'width':'100%'}"></p-dropdown>

...

</p-table>



from How to fit p-dropdown inside of a table cell?

No comments:

Post a Comment