Data Table: Add/Edit In Row

UI Components for Vue
Post Reply
allternative
Posts: 1
Joined: 17 Nov 2021, 17:38

18 Nov 2021, 17:07

Hello,

We just started using Prime Vue V2 and would like to know how we could Add and Edit a row inline in the data table and not in a popup like you have it the showcase here:

https://www.primefaces.org/primevue/showcase-v2/#/

Couldn't find it in the documentation.

Many thanks for your reply.

ihosteju
Posts: 9
Joined: 06 Sep 2021, 12:18

19 Nov 2021, 10:19

+1

I'm facing the same issue. As soon as i add custom buttons in a column with <template #body="slotProps"> like in the documentation about crud.
I can't make the edit button to work in row editing. Isn't there a method to do so?

Thank you ;)

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

03 Dec 2021, 10:18


ihosteju
Posts: 9
Joined: 06 Sep 2021, 12:18

07 Dec 2021, 17:34

Sure :-) That's why i'm asking. This example shows row edit mode with the default buttons.
And the crud example has customs buttons in <template #body...> tag. that trigger a Dialog for editing.
How could we get a datatable with custom buttons and row editing. Would be useful in case we need more buttons
The template part can be handled like below :

Code: Select all

<template #body="slotProps">
	<Button icon="pi pi-pencil" class="p-button-rounded p-button-primary p-mr-2" @click=XXX" />
        <Button icon="pi pi-trash" class="p-button-rounded p-button-warning" @click="XXX" />
</template>
<template #editor="slotProps">
	<Button icon="pi pi-check" class="p-button-rounded p-button-primary p-mr-2" @click=XXX" />
        <Button icon="pi pi-times" class="p-button-rounded p-button-secondary" @click="XXX" />
</template>
But what about functions or method should button trigger to switch from edit / cancel / save?

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

14 Dec 2021, 14:33

Sorry for the confusion. For now, there is no events for custom row editing.

Post Reply

Return to “PrimeVue”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 7 guests