Passing props of a component when I open with dynamic dialog #3621
Unanswered
mahmoudmahgoub
asked this question in
PrimeVue
Replies: 1 comment 2 replies
-
You can use the emit attribute to pass props to the component. It's not documented, so it's not supposed to be used in this way, I guess, and could be broken in the future. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I have component called "User" which has prop called name, when I render this component in a parent component template I do the following:
<User name="Mahmoud"/>
but now I am trying to open it using primevue dynamic dialog so I use the following lines in the setup section:
const dialog = useDialog(); dialog.open(User,{});
but I can't find a way to set the User prop, I know that I can use data as option for the dynamic dialog and from inside User component I access any passed data using dialogRef but User component is shared between different projects and the only way to pass data to it is through props
I appreciate any help
Beta Was this translation helpful? Give feedback.
All reactions