Hi,
I have used in Dataview template the attribute dataKey="something_unique" and the paginator works fine.
Now I want to use a Dialog on each item the Dataview template but when I click the Dialog button, all modals in the list open.
I know I can change the methods (openModal, closeModal) to use event.target or to change the component source code,
but is there any other way?
Thank you
Nested modal inside Dataview
Moved modal out of the Dataview (v-for) and leave button in Dataview (in loop).
Button emits an event which trigger the modal to open in parent component along with specific data (conditionaly based e.g. a unique id for a specific item) to populate the modal
Button emits an event which trigger the modal to open in parent component along with specific data (conditionaly based e.g. a unique id for a specific item) to populate the modal
Hi,
I'm looking to do exactly the same thing you are.
I have a data table for user notifications, and I'd like the user to open a modal with specific data related to that row item.
How did you pass the data from your table row to your modal?
Thank you!!
-Jason
I'm looking to do exactly the same thing you are.
I have a data table for user notifications, and I'd like the user to open a modal with specific data related to that row item.
How did you pass the data from your table row to your modal?
Thank you!!
-Jason
-
- Posts: 560
- Joined: 23 Oct 2020, 09:28
You could check delete and edit functionality in the crud example. https://www.primefaces.org/primevue/datatable/crud
-
- Information
-
Who is online
Users browsing this forum: No registered users and 7 guests