I found myself that I was mixing [style] and [listStyle]
As seen in the documentation, the problem is mixing the properties `[style]` and `[listStyle]`.
> - style - Inline style of the container.
> - styleClass - Style class of the container.
> - listStyle - Inline style of the list element
.
So the inline style should be splited in 2 different attributes:
Code: Select all
<p-listbox [options]="cities" [(ngModel)]="selectedCities" multiple="multiple" checkbox="checkbox" filter="filter" optionLabel="name"
[listStyle]="{'max-height':'150px'}"
[style]="{'width':'300px'}">
<p-header>
Cities
</p-header>
</p-listbox>