diff --git a/packages/nc-gui/components/smartsheet/grid/Table.vue b/packages/nc-gui/components/smartsheet/grid/Table.vue index 9f7bc8073f..e9aeb6e1b2 100644 --- a/packages/nc-gui/components/smartsheet/grid/Table.vue +++ b/packages/nc-gui/components/smartsheet/grid/Table.vue @@ -3,6 +3,8 @@ import axios from 'axios' import { nextTick } from '@vue/runtime-core' import type { ColumnReqType, ColumnType, PaginatedType, TableType, ViewType } from 'nocodb-sdk' import { UITypes, ViewTypes, isLinksOrLTAR, isSystemColumn, isVirtualCol } from 'nocodb-sdk' +import { useColumnDrag } from './useColumnDrag' + import { ActiveViewInj, CellUrlDisableOverlayInj, @@ -179,6 +181,12 @@ const { isUIAllowed } = useRoles() const hasEditPermission = computed(() => isUIAllowed('dataEdit')) const isAddingColumnAllowed = computed(() => !readOnly.value && !isLocked.value && isUIAllowed('fieldAdd') && !isSqlView.value) +const { onDrag, onDragStart, draggedCol, dragColPlaceholderDomRef, toBeDroppedColId } = useColumnDrag({ + fields, + tableBodyEl, + gridWrapper, +}) + // #Variables const addColumnDropdown = ref(false) @@ -1200,6 +1208,24 @@ const loaderText = computed(() => {