Added basic crud for objects
This commit is contained in:
@@ -47,18 +47,22 @@ const sections = computed<FieldSection[]>(() => {
|
||||
}
|
||||
|
||||
// Default section with all visible fields
|
||||
const visibleFields = props.config.fields
|
||||
.filter(f => f.showOnEdit !== false)
|
||||
.map(f => f.apiName)
|
||||
|
||||
return [{
|
||||
title: 'Details',
|
||||
fields: props.config.fields
|
||||
.filter(f => f.showOnEdit !== false)
|
||||
.map(f => f.apiName),
|
||||
fields: visibleFields,
|
||||
}]
|
||||
})
|
||||
|
||||
const getFieldsBySection = (section: FieldSection) => {
|
||||
return section.fields
|
||||
const fields = section.fields
|
||||
.map(apiName => props.config.fields.find(f => f.apiName === apiName))
|
||||
.filter(Boolean)
|
||||
|
||||
return fields
|
||||
}
|
||||
|
||||
const validateField = (field: any): string | null => {
|
||||
|
||||
Reference in New Issue
Block a user