Browse Source

Merge pull request #4045 from nocodb/fix/4029-ignore-ag-column-from-required

fix(gui): Row insert/update - ignore auto generated column from required
pull/4061/head
mertmit 2 years ago committed by GitHub
parent
commit
41c36f649e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      packages/nc-gui/utils/columnUtils.ts

7
packages/nc-gui/utils/columnUtils.ts

@ -168,7 +168,12 @@ const getUIDTIcon = (uidt: UITypes | string) => {
).icon
}
const isColumnRequired = (col?: ColumnType) => col && col.rqd && !col.cdf && !col.ai
// treat column as required if `non_null` is true and one of the following is true
// 1. column not having default value
// 2. column is not auto increment
// 3. column is not auto generated
const isColumnRequired = (col?: ColumnType) => col && col.rqd && !col.cdf && !col.ai && !col.meta?.ag
const isVirtualColRequired = (col: ColumnType, columns: ColumnType[]) =>
col.uidt === UITypes.LinkToAnotherRecord &&
(<LinkToAnotherRecordType>col.colOptions).type === RelationTypes.BELONGS_TO &&

Loading…
Cancel
Save