-
Notifications
You must be signed in to change notification settings - Fork 4.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dropdown inside p-dialog element opens under p-dialog footer #1205
Comments
Try either appendTo="body" on dialog or allow overflow on dialog. |
@Vegim were you able to resolve this issue, I am facing similar issue with a drop down inside dialog. |
Do you have any z-index for the button? |
@Naveen07 i have tried the option appendTo=body back then but it didnt worked. |
@Vegim Did you tried any other approach to get this resolved. I recently started using primeng. |
@Naveen07 Nope, I tried just the approaches mentioned in the answer. |
@cagataycivici @Vegim I was using primeng's pButton , I tried using a normal button and that fixed the issue :) |
That is weird, we need to check this. |
I'm unable to replicate; <p-dialog header="Godfather I" [(visible)]="display" modal="modal" width="350" responsive="true">
<span>The story begins as Don Vito Corleone, the head of a New York Mafia family, oversees his daughter's wedding.
His beloved son Michael has just come home from the war, but does not intend to become part of his father's business.
Through Michael's life the nature of the family business becomes clear. The business of the family is just like the head of the family,
kind and benevolent to those who give respect,
but given to ruthless violence whenever anything stands against the good of the family.</span>
<p-dropdown [options]="cities" [(ngModel)]="selectedCity" placeholder="Select a City" appendTo="body" [style]="{'width':'100%'}"></p-dropdown>
<p-footer>
<div class="ui-dialog-buttonpane ui-widget-content ui-helper-clearfix">
<button type="button" pButton icon="fa-close" (click)="display=false" label="No"></button>
<button type="button" pButton icon="fa-check" (click)="display=false" label="Yes"></button>
<button type="button" pButton icon="fa-close" (click)="display=false" label="No"></button>
<button type="button" pButton icon="fa-check" (click)="display=false" label="Yes"></button>
</div>
</p-footer>
</p-dialog> Which theme are you using? |
I'm using Ultima template. I'm trying to reproduce without send my entire project. Please give more time. |
Sorry cagataycivici It was my mistake. I've been adding the property: appendTo="body" To p-dialog instead to p-dropdown Finally the combination (in p-dropdown): appendTo="body" [style]="{'width':'100%'}" Solved my problem. |
sorry @cagataycivici thank sfor you help , I applied appendTo="body" on p-dialog instead of dropdown. the issue is resolved now. But I have a issue with multi select drop down inside p-dialog. this is my code |
Please create another issue for that one. |
Can you please update the demo page of the dialog with this info? Currently it has this section:
The example dropdown should have the |
@Mrtcndkn Please add dropdown to the demo of dialog so that we can provide an example. |
@cagataycivici In progress. |
Maybe an example of how to turn off the overflow of dialog content too? |
appendTo="body" on the p-dropdown fixed the issue for me. |
'appendTo="body" will scroll the dropdown menu along with the body/container scroll. Can this be made fixed? |
yes
…On Fri, Jul 20, 2018 at 4:14 PM bhuvhi ***@***.***> wrote:
'appendTo="body" will scroll the dropdown menu along with the
body/container scroll. Can this be made fixed?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1205 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AL-AL3TKL5PYzl9uDiknNSiFVTSrtaEQks5uIjoKgaJpZM4KphJ8>
.
|
The appendTo option will cause the options of the dropdown to scroll with the page behind it, if the page behind it is large enough to scroll. Using the [contentStyle]="{'overflow':'visible'}" approach fixes this, but if you have a p-footer, this will not display correctly. In this case, you need to add the following into your CSS, which is functionally equivalent to adding a "ui-g-12" class to the div which holds the footer. It may be good to modify the p-dialog so that the style of the footer (just like the style of the content) can be modified. p-dialog /deep/ .ui-dialog-footer { |
@hoffmast I am facing same issue,I have controls like dropdown/auto complete/multiselect and content of all is scrolling after using appendTo='body' with these controls and I have p-footer too.Please help how to resolve it. |
@hoffmast should I add appendTo='body' to these controls and do i need to add [contentStyle]="{'overflow':'visible'}" with p-dialog?Where we need to add below class and what is /deep/
|
Hello @deveshkrsingh . Sorry if I was unclear. The contentStyle approach and the appendTo approach are two separate approaches; you use one or the other. To fix your problem, you want to remove the appendTo statements but leave the contentStyle statements. In addition to having the contentStyle, you need to include the CSS (that is, the p-dialog /deep/ .ui-dialog-footer part) into whatever CSS (or SCSS) style sheet corresponds to the HTML file where you have your dialog. Using /deep/ allows you to change the styles of a class that is within a component someone else built. I do not know all the intricacies of /deep/ and know some people do not like to use it (it is technically deprecated I believe), but I do not know of any alternatives, currently. |
@hoffmast Thanks It worked.I have used [contentStyle]="{'overflow':'visible'}" on p-dialog and I am not using css without deep.
|
Add in css and i use in angular with nb-accordion :host { and remove appendTo from html |
@Crunkelton Is this fixed? |
Append to body means when you scroll document page then drop-down menu
panel will also scroll with drop-down header.
Please share your requirements.
…On Thu, Aug 13, 2020, 17:13 Abhishek Kumar ***@***.***> wrote:
'appendTo="body" will scroll the dropdown menu along with the
body/container scroll. Can this be made fixed?
@Crunkelton <https://github.com/Crunkelton> Is this fixed?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1205 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANQ3DQNRWGGTWUVABP7O2MTSAPGU3ANCNFSM4CVGCJ6A>
.
|
'appendTo="body" is work for me but when we close the dialog using clicking the modal background, the dropdown panel still appearing in the screen, but dialog is closed |
after applying appendTo="body" it's working |
The text was updated successfully, but these errors were encountered: