Add record block layout options (wrap, no wrap)
This commit is contained in:
@@ -19,6 +19,7 @@ interface Options {
|
||||
referenceModuleID?: string;
|
||||
inlineRecordEditEnabled: boolean;
|
||||
horizontalFieldLayoutEnabled: boolean;
|
||||
recordFieldLayoutOption: string;
|
||||
}
|
||||
|
||||
const defaults: Readonly<Options> = Object.freeze({
|
||||
@@ -32,6 +33,7 @@ const defaults: Readonly<Options> = Object.freeze({
|
||||
referenceModuleID: undefined,
|
||||
inlineRecordEditEnabled: false,
|
||||
horizontalFieldLayoutEnabled: false,
|
||||
recordFieldLayoutOption: 'default',
|
||||
})
|
||||
|
||||
export class PageBlockRecord extends PageBlock {
|
||||
@@ -47,7 +49,7 @@ export class PageBlockRecord extends PageBlock {
|
||||
applyOptions (o?: Partial<Options>): void {
|
||||
if (!o) return
|
||||
|
||||
Apply(this.options, o, String, 'magnifyOption', 'recordSelectorDisplayOption', 'recordSelectorAddRecordDisplayOption', 'referenceField', 'referenceModuleID')
|
||||
Apply(this.options, o, String, 'magnifyOption', 'recordSelectorDisplayOption', 'recordSelectorAddRecordDisplayOption', 'referenceField', 'referenceModuleID', 'recordFieldLayoutOption')
|
||||
Apply(this.options, o, Boolean, 'recordSelectorShowAddRecordButton', 'inlineRecordEditEnabled', 'horizontalFieldLayoutEnabled')
|
||||
|
||||
if (o.fields) {
|
||||
|
||||
Reference in New Issue
Block a user