Add record block layout options (wrap, no wrap)

This commit is contained in:
Emmy Leke
2024-09-26 13:37:03 +02:00
committed by Jože Fortun
parent 56aee83f3e
commit a1e1b2d565
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) {