By default autowidth property of DropDown component is true.But the input width is not calculated based on panel width.If we disable the autoWidth behaviour then it works properly.

I have this problem on autoWidth enabled and disabled, it doesn't change anything for me.
Actually, I can't have a p-drodown with a width matching the elements when the options are dynamics.
Could you try to add this to your style ?
.ui-dropdown-panel {
max-width: 0;
}
Hi, @muhammad-saleh , thank you for your concern !
My problem is solved, it was a silly mistake from me :
<p-dropdown
[options]="workspaceOptions"
[ngModel]="workspaceInit"
(onChange)="changeWorkspace($event)"
[filter]="workspaceOptions.length > 5">
[autoWidth]="true"
[style]="{'width': '100%'}">
</p-dropdown>
You see the early closing tag ? So autoWidth and style weren't send to the p-dropdown.
But the original issue is still happening !
Unable to replicate, please provide a test case based on plunkr below and we'll review again.
Most helpful comment
Hi, @muhammad-saleh , thank you for your concern !
My problem is solved, it was a silly mistake from me :
<p-dropdown [options]="workspaceOptions" [ngModel]="workspaceInit" (onChange)="changeWorkspace($event)" [filter]="workspaceOptions.length > 5"> [autoWidth]="true" [style]="{'width': '100%'}"> </p-dropdown>You see the early closing tag ? So autoWidth and style weren't send to the p-dropdown.
But the original issue is still happening !