3
0

Add record block layout options (wrap, no wrap)

This commit is contained in:
Emmy Leke
2024-06-26 14:34:37 +01:00
committed by Jože Fortun
parent 26c662ef16
commit c4e59670b8
8 changed files with 217 additions and 8 deletions
@@ -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) {