Skip to content
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

Dynamic Dialog: custom header template #9235

Closed
projectX21 opened this issue Sep 3, 2020 · 35 comments
Closed

Dynamic Dialog: custom header template #9235

projectX21 opened this issue Sep 3, 2020 · 35 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible Type: New Feature Issue contains a new feature or new component request

Comments

@projectX21
Copy link

projectX21 commented Sep 3, 2020

If you have a PrimeNG PRO Support subscription please post your issue at;

https://pro.primefaces.org

where our team will respond within 4 business hours.

If you do not have a PrimeNG PRO Support subscription, fill-in the report below. Please note that
your issue will be added to the waiting list of community issues and will be reviewed on a first-come first-serve basis, as a result, the support team is unable to guarantee a specific schedule on when it will be reviewed. Thank you for your understanding.

Current Queue Time for Review
Without PRO Support: ~8-12 weeks.
With PRO Support: 1 hour

I'm submitting a ... (check one with "x")

[ ] bug report => Search github for a similar issue or PR before submitting
[ x ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Plunkr Case (Bug Reports)
Please demonstrate your case at stackblitz by using the issue template below. Issues without a test case have much less possibility to be reviewd in detail and assisted.

Current behavior

imho it isn't possible to define a custom p-header in a dynamic dialog. Instead the specified component will be rendered into the dialog body and you are only able to set the header text via the DynamicDialog properties.

Expected behavior
You should be able to define a custom header template as it is possible for the normal dialog.

@projectX21
Copy link
Author

Maybe there is a workaround to archive custom headers in a dynamic dialog?
I think this is a much needed feature.. For clean code I want to outsource the dialogs from the components.
This isn't possible with normal dialogs, because their code is in the same parent component, isn't it?

@yigitfindikli yigitfindikli added the Type: New Feature Issue contains a new feature or new component request label Nov 24, 2020
@igority
Copy link

igority commented Dec 21, 2020

If I may suggest this feature to be extended to 'Custom header and footer'. I believe custom footer is even more needed, since a common UI convention is to add the Save/Dismiss buttons to the footer of the modal. Currently that is not possible, and achieving a workaround with the current implementation is very hackish

@teland94
Copy link

teland94 commented Jan 5, 2021

It's awful for such great library.. Header and Footer are must be customizable with ng-template..

@kareljuricka
Copy link

+1

@idanielsteven
Copy link

+1

This is a big gap. need very much.

@benshabatnoam
Copy link

+1
Will you guys accept a PR for that?

@marchrenno
Copy link

marchrenno commented Mar 13, 2021

+1
Very much needed. A possible workaround in the mean time is to use a div in the body of the Dynamic Dialog, with absolute position, and place it on top.

@tapoinde
Copy link

+1, and you should also be able to customize the footer. A similar approach to how Angular Material does this would be ideal.

example.component.html

<h2 pDialogTitle>The Title</h2>
<p-dialog-content>
   ... 
</p-dialog-content>
<p-dialog-actions>
   <button>Close</button>
   <button>Save</button>
</p-dialog-actions>

@bmizepatterson
Copy link

+1
Much needed!

@NarjesSharafi
Copy link

+1
DynamicDialog has some defects in maximizing, minimizing, and dragging dialog too.

@lucassalatiel1993
Copy link

+1
Cabeçalho e rodapé personalizados em DinamicDialog Deve existir, pois é algo comum.

@jonnomk
Copy link

jonnomk commented Jun 7, 2021

+1

@Kallaran
Copy link

+1

Big gap :(

@dinesh-88
Copy link

+1

7 similar comments
@JBottelsen
Copy link

+1

@schlagi123
Copy link

+1

@luketanner
Copy link

+1

@JerinJ
Copy link

JerinJ commented Aug 11, 2021

+1

@mycahmason
Copy link

+1

@pkalkman
Copy link

+1

@Gixen
Copy link

Gixen commented Oct 14, 2021

+1

@frank71336
Copy link

+1
Seems to me, too, that the customizable footer is needed even more than a customizable header.

Btw: If you do not provide a footer text (and you can't provide a customizable footer) there is no border radius at the bottom of the dialog - even when looking at the official example: https://www.primefaces.org/primeng/showcase/#/dynamicdialog

@jonnomk
Copy link

jonnomk commented Dec 2, 2021

I noticed that too and fixed it myself with CSS. The most frustrating issue though is not being able to specify a header and footer template that appear outside of the dialog content which means there's no scrolling body.

@Fichtenmeer
Copy link

I would also really love that feature, just found a little workaround for now. Maybe this helps for someone else.

You can hide the header with the parameter "showHeader". If you do so, you can design your own one and template it.

@Muzummil
Copy link

+1

1 similar comment
@vtozkan
Copy link

vtozkan commented Oct 18, 2022

+1

@mertsincan
Copy link
Member

Hi,

So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation. If there is no improvement on this, can you reopen the issue so we can include it in our roadmap?
Please don't forget to add your feedback as a comment after reopening the issue. These will be taken into account by us and will contribute to the development of this feature. Thanks a lot for your understanding!

Best Regards,

@saramcicchi
Copy link

Hi @mertsincan - this feature has not been implemented yet. Can you please reopen?

@mertsincan mertsincan reopened this Nov 11, 2022
@github-actions github-actions bot added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 11, 2022
@ARBS23
Copy link

ARBS23 commented May 16, 2023

I would also really love that feature, just found a little workaround for now. Maybe this helps for someone else.

You can hide the header with the parameter "showHeader". If you do so, you can design your own one and template it.

Yes we can but, other features like dragging can't be find if we use showHeader as false

@nathan7432
Copy link

I also stumbled upon this thread looking for this feature.

@vborutenko
Copy link

One workaround - https://stackoverflow.com/a/77330067/2021019

@shaka-b
Copy link

shaka-b commented Oct 24, 2023

+1

1 similar comment
@trantoi99
Copy link

+1

@cetincakiroglu
Copy link
Contributor

Added in v17, please check the example for usage https://primeng.org/dynamicdialog#example and also please check the templating options of dynamic dialog https://primeng.org/dynamicdialog#api.dynamicdialog-ref.interfaces.DynamicDialogTemplates

@jason1004156
Copy link

jason1004156 commented Jan 23, 2024

Is Possible to let header width fit the dialog?
I tried use width: 100% in headerTemplate.scss file but not working, because it will fit the <ng-component class="ng-star-inserted"> but this element can't be set style directly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible Type: New Feature Issue contains a new feature or new component request
Projects
None yet
Development

No branches or pull requests