Nested modal inside Dataview

UI Components for Vue
Post Reply
stekosto
Posts: 2
Joined: 14 Nov 2022, 19:12

14 Nov 2022, 19:29

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

stekosto
Posts: 2
Joined: 14 Nov 2022, 19:12

16 Nov 2022, 18:15

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

JD45
Posts: 2
Joined: 10 May 2022, 06:29

12 Dec 2022, 00:08

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

tugce.kucukoglu
Posts: 560
Joined: 23 Oct 2020, 09:28

26 Dec 2022, 10:08

You could check delete and edit functionality in the crud example. https://www.primefaces.org/primevue/datatable/crud

Post Reply

Return to “PrimeVue”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 9 guests