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.
Data Table: Add/Edit In Row
-
- Posts: 560
- Joined: 23 Oct 2020, 09:28
Did you check that this examples https://www.primefaces.org/primevue/sho ... table/edit
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 :
But what about functions or method should button trigger to switch from edit / cancel / save?
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>
-
- Posts: 560
- Joined: 23 Oct 2020, 09:28
Sorry for the confusion. For now, there is no events for custom row editing.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 3 guests