diff --git a/packages/nc-gui/components/project/spreadsheet/components/EditColumn.vue b/packages/nc-gui/components/project/spreadsheet/components/EditColumn.vue index 1f37ed82a3..d08afc6a10 100644 --- a/packages/nc-gui/components/project/spreadsheet/components/EditColumn.vue +++ b/packages/nc-gui/components/project/spreadsheet/components/EditColumn.vue @@ -132,12 +132,7 @@ - + @@ -649,17 +644,20 @@ export default { if (this.newColumn.uidt === 'Formula' && this.$refs.formula) { return await this.$refs.formula.save(); } - this.newColumn.table_name = this.nodes.table_name - this.newColumn.title = this.newColumn.column_name + this.newColumn.table_name = this.nodes.table_name; + this.newColumn.title = this.newColumn.column_name; if (this.isSelect && this.$refs.customselect) { if (this.column) { - await this.$refs.customselect.update() - } else { - await this.$refs.customselect.save() + if (await this.$refs.customselect.update()) { + await this.$emit('saved'); + return this.$emit('close'); + } + } else if (await this.$refs.customselect.save()) { + await this.$emit('saved'); + return this.$emit('close'); } - await this.$emit('saved') - return this.$emit('close') + return; } if (this.editColumn) { @@ -692,17 +690,13 @@ export default { if (this.newColumn.uidt !== UITypes.ID) { this.newColumn.primaryKey = false; } - this.newColumn.ai = false - this.newColumn.cdf = null - this.newColumn.un = false - this.newColumn.dtxp = this.sqlUi.getDefaultLengthForDatatype( - this.newColumn.dt - ) - this.newColumn.dtxs = this.sqlUi.getDefaultScaleForDatatype( - this.newColumn.dt - ) - - this.newColumn.dtx = 'specificType' + this.newColumn.ai = false; + this.newColumn.cdf = null; + this.newColumn.un = false; + this.newColumn.dtxp = this.sqlUi.getDefaultLengthForDatatype(this.newColumn.dt); + this.newColumn.dtxs = this.sqlUi.getDefaultScaleForDatatype(this.newColumn.dt); + + this.newColumn.dtx = 'specificType'; if (this.isCurrency) { if (this.column?.uidt === UITypes.Currency) { diff --git a/packages/nc-gui/components/project/spreadsheet/components/editColumn/CustomSelectOptions.vue b/packages/nc-gui/components/project/spreadsheet/components/editColumn/CustomSelectOptions.vue index a9af26d0d8..9e4aac381d 100644 --- a/packages/nc-gui/components/project/spreadsheet/components/editColumn/CustomSelectOptions.vue +++ b/packages/nc-gui/components/project/spreadsheet/components/editColumn/CustomSelectOptions.vue @@ -1,173 +1,156 @@ - - - mdi-drag-vertical - - - - - mdi-arrow-down-drop-circle - + + mdi-drag-vertical + + + mdi-arrow-down-drop-circle - + - - - mdi-close - + + mdi-close - - - mdi-plus - + + mdi-plus Add option + + {{ error }} +