pop-confirm call :on-ok from the beginning
vincenzoraco opened this issue · comments
Vincenzo Raco commented
<column label="Actions" field="actions">
<template scope="row">
<a class="button is-small is-primary" v-on:click="view(row.actions.uid)">View</a>
<a class="button is-small is-warning" v-on:click="edit(row.actions.uid)">Edit</a>
<pop-confirm content="Are you sure?" :on-cancel="cancel" :on-ok="destroy(row.actions.uid)" >
<button class="button is-small is-danger">Delete</button>
</pop-confirm>
</template>
</column>
I placed a pop-confirm inside a table, and the :on-ok function is called every time the table is updated (a row is generated), so basically, it deletes all the rows (because it's its function).
It doesn't do this on :on-cancel.