Browse Source

fix: form issue

Signed-off-by: Wing-Kam Wong <wingkwong.code@gmail.com>
pull/1668/head
Wing-Kam Wong 3 years ago
parent
commit
0efcc1b6f5
  1. 1
      packages/nc-gui/components/project/spreadsheet/rowsXcDataTable.vue
  2. 6
      packages/nc-gui/components/project/spreadsheet/views/formView.vue

1
packages/nc-gui/components/project/spreadsheet/rowsXcDataTable.vue

@ -438,6 +438,7 @@
:primary-value-column="primaryValueColumn" :primary-value-column="primaryValueColumn"
:form-params.sync="extraViewParams.formParams" :form-params.sync="extraViewParams.formParams"
:view.sync="selectedView" :view.sync="selectedView"
:view-title="selectedView.title"
@onNewColCreation="loadMeta(false)" @onNewColCreation="loadMeta(false)"
/> />
</template> </template>

6
packages/nc-gui/components/project/spreadsheet/views/formView.vue

@ -486,7 +486,7 @@ export default {
'meta', 'availableColumns', 'nodes', 'meta', 'availableColumns', 'nodes',
'sqlUi', 'formParams', 'showFields', 'sqlUi', 'formParams', 'showFields',
'fieldsOrder', 'allColumns', 'dbAlias', 'fieldsOrder', 'allColumns', 'dbAlias',
'api', 'id', 'viewId' 'api', 'id', 'viewId', 'viewTitle'
], ],
data: () => ({ data: () => ({
isVirtualCol, isVirtualCol,
@ -515,7 +515,7 @@ export default {
if (!this.localParams || !this.localParams.fields || !this.localParams.fields[column.alias]) { if (!this.localParams || !this.localParams.fields || !this.localParams.fields[column.alias]) {
continue continue
} }
if (!column.virtual && (((column.rqd || column.notnull) && !column.default) || (column.pk && !(column.ai || column.default)) || this.localParams.fields[column.alias].required)) { if (!column.virtual && (((column.rqd || column.notnull) && !column.cdf) || (column.pk && !(column.ai || column.default)) || this.localParams.fields[column.alias].required)) {
obj.localState[column.title] = { required } obj.localState[column.title] = { required }
} else if (column.bt) { } else if (column.bt) {
const col = this.meta.columns.find(c => c.column_name === column.bt.column_name) const col = this.meta.columns.find(c => c.column_name === column.bt.column_name)
@ -844,7 +844,7 @@ export default {
'noco', 'noco',
this.projectName, this.projectName,
this.meta.title, this.meta.title,
this.selectedView.title, this.viewTitle,
this.localState this.localState
) )

Loading…
Cancel
Save