From f6ec8f1ac70011e10f5e197eb6f9291613deac39 Mon Sep 17 00:00:00 2001 From: Daniel Spaude Date: Thu, 19 Jan 2023 09:23:13 +0100 Subject: [PATCH] add 'delete row' and 'duplicate row' buttons to edit overaly - WIP --- .../smartsheet/expanded-form/Header.vue | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/expanded-form/Header.vue b/packages/nc-gui/components/smartsheet/expanded-form/Header.vue index 87ba3ae048..2aa794ff61 100644 --- a/packages/nc-gui/components/smartsheet/expanded-form/Header.vue +++ b/packages/nc-gui/components/smartsheet/expanded-form/Header.vue @@ -79,10 +79,19 @@ const { deleteRowById } = useViewData(meta, ref(props.view)) const duplicateRow = () => alert('duplicateRow') -const onDeleteRowClick = async () => { +const showDeleteRowModal = ref(false) + +const onDeleteRowClick = () => { // alert('deleteRow') + showDeleteRowModal.value = true +} + +const onConfirmDeleteRowClick = async () => { + showDeleteRowModal.value = false await deleteRowById(primaryKey.value) reloadTrigger.trigger() + emit('cancel') + message.success('Row deleted') // loadData() // deleteRow } @@ -93,7 +102,6 @@ const onDeleteRowClick = async () => { // await deleteRowById(primaryKey) // loadData() // } -