Confirmation with different messages

UI Components for Angular
Post Reply
elyoukey@gmail.com
Posts: 1
Joined: 22 Jul 2016, 15:24

27 Sep 2016, 10:05

hello
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 ?

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

27 Sep 2016, 10:58

This was a known issue fixed in upcoming beta17;

https://github.com/primefaces/primeng/issues/958

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 24 guests