i have an issue with the confirmdialog
the message is not updated when several confirmations are asked.
For exemple i want to confirm the deletion and i would like a custom confirmation for each element
"are you sure you want to delete A ?"
then
"are you sure you want to delete B ?"
etc...
but the dialog keep saying "are you sure to delete A?"
here is my code:
Code: Select all
deleteUser(user){
this._confirmationService.confirm({
message: 'Etes-vous sur de vouloir supprimer le compte '+user.username,
accept: () => {
console.log('ok');
}
});
}
Code: Select all
<p-dataTable
#dt
[value]="listeUsers"
[globalFilter]="gb"
>
<p-column field="username" header="Username" [filter]="true"></p-column>
<p-column field="nom" header="Nom" [filter]="true"></p-column>
<p-column field="prenom" header="Prénom" [filter]="true"></p-column>
<p-column >
<template let-col let-user="rowData" pTemplate type="body">
<button pButton icon="fa-close" (click)="deleteUser(user);" label="Supprimer"></button>
</template>
</p-column>
</p-dataTable>
Anyone can help ?