diff --git a/assets/src/vue/components/page-builder/Addon.vue b/assets/src/vue/components/page-builder/Addon.vue index c66d9235..45550efa 100644 --- a/assets/src/vue/components/page-builder/Addon.vue +++ b/assets/src/vue/components/page-builder/Addon.vue @@ -125,9 +125,14 @@ export default { emit('duplicate'); } - function remove() { - u.confirm('Are you sure to delete it?') - .then(() => emit('delete')); + async function remove() { + const v = await u.confirm('Are you sure you want to delete??'); + + if (v) { + emit('delete'); + } + + return v; } // function addAddon() { diff --git a/assets/src/vue/components/page-builder/Column.vue b/assets/src/vue/components/page-builder/Column.vue index ae91ef44..bc653f09 100644 --- a/assets/src/vue/components/page-builder/Column.vue +++ b/assets/src/vue/components/page-builder/Column.vue @@ -301,9 +301,14 @@ function toggleDisabled() { content.value.disabled = !content.value.disabled; } -function remove() { - u.confirm('Are you sure you want to delete?') - .then(() => emit('delete')); +async function remove() { + const v = await u.confirm('Are you sure you want to delete??'); + + if (v) { + emit('delete'); + } + + return v; } function duplicateThisAddon(item, i) { diff --git a/assets/src/vue/components/page-builder/Row.vue b/assets/src/vue/components/page-builder/Row.vue index 1d159974..8a004dad 100644 --- a/assets/src/vue/components/page-builder/Row.vue +++ b/assets/src/vue/components/page-builder/Row.vue @@ -290,9 +290,14 @@ function toggleDisabled() { content.value.disabled = !content.value.disabled; } -function remove() { - u.confirm('Are you sure you want to delete??') - .then(() => emit('delete')); +async function remove() { + const v = await u.confirm('Are you sure you want to delete??'); + + if (v) { + emit('delete'); + } + + return v; } function getEmptyRow() {