p-dropdown still causes page to horizontally scroll
Originally posted by @eduardtyutyunik in https://github.com/primefaces/primeng/issues/10992#issuecomment-1008839338
Hi. Sorry, but it doesn't really fixed the issue. If you put the dropdown to the right half of the page. In your example: <p-dropdown [options]="cities" [(ngModel)]="selectedCity1" placeholder="Select a City" optionLabel="name" [showClear]="true" style="margin-left: 300px;"> then the horizontal scroll also happens. The same problem is in the paginator of tables. If the page has a horizontal scroll and the padinator of the table is on the right half of the page, the page scrolls horizontally when the paginator will be oppend.
https://stackblitz.com/edit/primeng-tablepage-demo-qcryef?file=src%2Fapp%2Fapp.component.html
My work around to this issue was to make it appendTo='body'. This resolved the shifting.
I also had to add paginatorDropdownAppendTo='body' to my tables so that the paginator did not show the same problems.
My work around to this issue was to make it appendTo='body'. This resolved the shifting.
I also had to add paginatorDropdownAppendTo='body' to my tables so that the paginator did not show the same problems.
Thank you. It works! I think it has to be a default behaviour (at least for tables).
Verified fixed on 13.0.4
I'm still seeing the issue on 13.4.1 and the scrollTo= option isn't changing the behavior. My dropdown is in the right half of the screen. Any other suggestions? Is there a stackblitz out there showing the fix for a dropdown in the right portion of the screen?