diff --git a/packages/nc-gui-v2/components/smartsheet/Form.vue b/packages/nc-gui-v2/components/smartsheet/Form.vue index 32aa41bed1..69cd029852 100644 --- a/packages/nc-gui-v2/components/smartsheet/Form.vue +++ b/packages/nc-gui-v2/components/smartsheet/Form.vue @@ -340,11 +340,16 @@ watch(submitted, (v) => { } }) -function handleMouseUp(col: Record) { +function handleMouseUp(col: Record, hiddenColIndex: number) { if (!moved.value) { const index = localColumns.value.length col.order = (index ? localColumns.value[index - 1].order : 0) + 1 col.show = true + + /** remove column from hiddenColumns and add to localColumns */ + localColumns.value.push(col) + hiddenColumns.value.splice(hiddenColIndex, 1) + saveOrUpdate(col, index) } } @@ -421,13 +426,13 @@ onMounted(async () => { @start="drag = true" @end="drag = false" > -