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

Make DynamicDialog more flexible, fix docs #5679

Closed
wants to merge 2 commits into from

Conversation

marcopixel
Copy link

This pull request aims to improve the DynamicDialog by making it a bit more flexible to use and also fix a few annoying gripes i've found with it (especially with handling emits and props):

Here's a quick summary:

  • Allow for container template
    Pretty self explanatary, it will allow the dynamicDialog to also have a "headless" mode similar to the Dialog component itself.

  • Move content component into obj
    This is caused by the point above, since you don't need a content component if you're declaring the container directly.

  • Seperate child component props & emits
    I've noticed that there's no official documented way to send props to the child component so i've dug deeper and found out that emits just v-bind's directly to the child component. Theoretically you could use options.emits to pass props but i've found it kinda weird to use and not logical.

  • Rename dialogProps to seperate from child component props
    Since the dialog also has it own props i've reused the options.props for the child component (similar to options.emits) and moved the dialog props into options.dialogProps.

The changes i've made are ❗BREAKING❗ but i think they offer enough value to justify the additional migration step when updating the library.

This will add the following changes:
- Allow for container template
- Move content component into obj
- Seperate child component props & emits
- Rename dialogProps to seperate from child component props
Copy link

vercel bot commented May 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
primevue ⬜️ Ignored (Inspect) Visit Preview May 3, 2024 9:14am
primevue-v4 ⬜️ Ignored (Inspect) Visit Preview May 3, 2024 9:14am

@tugcekucukoglu
Copy link
Member

Thank you for your recent PR. We appreciate your effort and dedication to improving our project. However, after careful review, we inform you that we are unable to accept the PR at this time due to the presence of breaking changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants