mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
880 B
33 lines
880 B
export default { |
|
props: { |
|
disabledColumns: { |
|
type: Object, |
|
default() { |
|
return {} |
|
} |
|
}, |
|
sqlUi: [Object, Function], |
|
nodes: [Object], |
|
api: [Object] |
|
}, |
|
methods: { |
|
isValid(_columnObj, rowObj, required = false) { |
|
if (!this.meta) { return } |
|
let columnObj = _columnObj |
|
if (columnObj.bt) { |
|
columnObj = this.meta.columns.find(c => c.cn === columnObj.bt.cn) |
|
} |
|
return ((required || columnObj.rqd) && |
|
(rowObj[columnObj._cn] === undefined || rowObj[columnObj._cn] === null) && |
|
!columnObj.default) |
|
}, |
|
isRequired(_columnObj, rowObj, required = false) { |
|
let columnObj = _columnObj |
|
if (columnObj.bt) { |
|
columnObj = this.meta.columns.find(c => c.cn === columnObj.bt.cn) |
|
} |
|
return ((required || columnObj.rqd) && |
|
!columnObj.default) |
|
} |
|
} |
|
}
|
|
|