diff --git a/packages/nc-gui/components/project/spreadsheet/components/spreadsheetNavDrawer.vue b/packages/nc-gui/components/project/spreadsheet/components/spreadsheetNavDrawer.vue index 9ade88a856..548df113f8 100644 --- a/packages/nc-gui/components/project/spreadsheet/components/spreadsheetNavDrawer.vue +++ b/packages/nc-gui/components/project/spreadsheet/components/spreadsheetNavDrawer.vue @@ -758,6 +758,7 @@ export default { fields: Object.keys(this.showFields) .filter(f => this.showFields[f]) .join(','), + fieldsOrder: this.fieldsOrder, extraViewParams: this.extraViewParams, selectedViewId: this.selectedViewId }, diff --git a/packages/nc-gui/components/project/spreadsheet/public/xcForm.vue b/packages/nc-gui/components/project/spreadsheet/public/xcForm.vue index c23d349343..9d5764c132 100644 --- a/packages/nc-gui/components/project/spreadsheet/public/xcForm.vue +++ b/packages/nc-gui/components/project/spreadsheet/public/xcForm.vue @@ -33,15 +33,16 @@ - NocoDB + + NocoDB

- + @@ -273,7 +274,7 @@ export default { this.dbAlias = dbAlias this.metas = relatedTableMetas - const fields = this.query_params.fields.split(',') + const fields = this.query_params.fieldsOrder || [] // eslint-disable-next-line camelcase let columns = this.meta.columns @@ -306,7 +307,6 @@ export default { } }) } - debugger // this.modelName = model_name this.columns = columns.filter(c => fields.includes(c.alias)).sort((a, b) => fields.indexOf(a.alias) - fields.indexOf(b.alias)) diff --git a/packages/nc-gui/components/project/spreadsheet/views/formView.vue b/packages/nc-gui/components/project/spreadsheet/views/formView.vue index 8ba3f85a3b..da1f97940d 100644 --- a/packages/nc-gui/components/project/spreadsheet/views/formView.vue +++ b/packages/nc-gui/components/project/spreadsheet/views/formView.vue @@ -477,7 +477,6 @@ export default { return this.allColumns.filter(c => this.showFields[c.alias] && !hiddenCols.includes(c.cn)).sort((a, b) => ((this.fieldsOrder.indexOf(a.alias) + 1) || Infinity) - ((this.fieldsOrder.indexOf(b.alias) + 1) || Infinity)) }, set(val) { - debugger const showFields = val.reduce((o, v) => { o[v.alias] = true return o