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 footer scrolling issue #15883

Closed
jbcbezerra opened this issue Jun 21, 2024 · 3 comments
Closed

Dynamic Dialog footer scrolling issue #15883

jbcbezerra opened this issue Jun 21, 2024 · 3 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@jbcbezerra
Copy link

jbcbezerra commented Jun 21, 2024

Describe the bug

I am currently working with the PrimeNG Dynamic Dialog component and encountering an issue when trying to submit a form within my `A-Dialog-Component'. There are two approaches I’ve tried:

  1. Using a div with the 'p-dialog-footer' class:
    By defining a div in the template of A-Dialog-Component and marking it with the class p-dialog-footer, the form submission works.
    However, this method causes issues with scrolling and resizing, which do not function properly.

  2. Using a custom footer component:
    By defining a custom footer component (A-Dialog-Footer-Component) and including it in the template configuration when opening the dialog via dialogService.open(A-Dialog-Component, { ..., templates: { footer: A-Dialog-Footer-Component } }), the form submission only works when sending a event to the A-Dialog-Componen.
    This approach necessitates the use of an additional service for communication between the footer and the body components, where the service forwards events (e.g., onSaveEvent) to the body component.

The second approach seems inefficient as it requires creating a service solely for event forwarding for each dialog. Notice here, that we would need one extra service for each dialog where we have a custom footer component (probably in every form-dialog). While I respect your design choice, could you please address the scrolling issue in the first approach? This would benefit those of us who prefer not to implement an extra service for each dialog. Thank you!

Environment

clean angular cli application with only a dynami dialog

Reproducer

No response

Angular version

18.0.2

PrimeNG version

17.18.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.11.1

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

Scrolling of the dynamic dialog to work properly when using a 'p-dyalog-footer' in the body.

@jbcbezerra jbcbezerra added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jun 21, 2024
@jbcbezerra
Copy link
Author

jbcbezerra commented Jun 22, 2024

I think a better solution would be to make a headless template option for the DynamicDialogTemplates where the user can completly design the dialog for himself while he can still profit from the service logic in the background (like Angular material).

@jbcbezerra
Copy link
Author

jbcbezerra commented Dec 6, 2024

just wanting to know if anything is even happening here since i waitet half a year now haha? @mertsincan

@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 and try the latest PrimeNG version(v19). If there is no improvement on this, can you open a new issue so we can include it in our roadmap?

Thanks a lot for your understanding!
Best Regards,

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
Projects
None yet
Development

No branches or pull requests

2 participants