From 768eaff09ecfb1a63672ad17118bf23e5abc7a0d Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Tue, 7 Nov 2023 07:17:37 +0000 Subject: [PATCH 1/4] fix: Added column id copy in Field manager and added option to display column --- .../components/smartsheet/details/Fields.vue | 108 +++++++++++++++++- 1 file changed, 106 insertions(+), 2 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/details/Fields.vue b/packages/nc-gui/components/smartsheet/details/Fields.vue index e90ba5c065..59454c899d 100644 --- a/packages/nc-gui/components/smartsheet/details/Fields.vue +++ b/packages/nc-gui/components/smartsheet/details/Fields.vue @@ -48,6 +48,8 @@ const visibilityOps = ref([]) const fieldsListWrapperDomRef = ref() +const { copy } = useClipboard() + const { fields: viewFields, toggleFieldVisibility, loadViewColumns, isViewColumnsLoading } = useViewColumnsOrThrow() const loading = ref(false) @@ -56,6 +58,8 @@ const columnsHash = ref() const newFields = ref([]) +const isFieldIdCopied = ref(false) + const compareCols = (a?: TableExplorerColumn, b?: TableExplorerColumn) => { if (a?.id && b?.id) { return a.id === b.id @@ -646,6 +650,12 @@ onKeyDown('ArrowRight', () => { } }) +const onClickCopyFieldUrl = async (field: ColumnType) => { + await copy(field.id!) + + isFieldIdCopied.value = true +} + const keys = useMagicKeys() whenever(keys.meta_s, () => { @@ -819,10 +829,39 @@ onMounted(async () => { - + + +