diff --git a/packages/nc-gui/components/smartsheet/expanded-form/Header.vue b/packages/nc-gui/components/smartsheet/expanded-form/Header.vue index 3f12710d3e..eebcd8a981 100644 --- a/packages/nc-gui/components/smartsheet/expanded-form/Header.vue +++ b/packages/nc-gui/components/smartsheet/expanded-form/Header.vue @@ -12,7 +12,7 @@ import { const props = defineProps<{ view?: ViewType }>() -const emit = defineEmits(['cancel']) +const emit = defineEmits(['cancel', 'duplicateRow']) const route = useRoute() @@ -75,9 +75,14 @@ useEventListener(document, 'keydown', async (e: KeyboardEvent) => { } }) -const { deleteRowById } = useViewData(meta, ref(props.view)) +const { deleteRowById, addEmptyRow } = useViewData(meta, ref(props.view)) -const duplicateRow = () => alert('duplicateRow') +// const onDuplicateRowClick = async () => { +// // const newRow = duplicateRowById(primaryKey.value) +// // console.log('newRow', newRow) +// const newRow = await addEmptyRow() +// // expandForm(newRow) +// } const showDeleteRowModal = ref(false) @@ -172,7 +177,7 @@ const onConfirmDeleteRowClick = async () => {