Add record list configuration for columns text wrap
This commit is contained in:
committed by
Jože Fortun
parent
c0fd4219a8
commit
005f698d59
@@ -69,6 +69,10 @@ export interface Options {
|
||||
filterPresets: FilterPreset[];
|
||||
showRecordPerPageOption: boolean;
|
||||
openRecordInEditMode: boolean;
|
||||
|
||||
textStyles: {
|
||||
noWrapFields: Array<string>
|
||||
}
|
||||
}
|
||||
|
||||
const defaults: Readonly<Options> = Object.freeze({
|
||||
@@ -124,6 +128,10 @@ const defaults: Readonly<Options> = Object.freeze({
|
||||
filterPresets: [],
|
||||
showRecordPerPageOption: false,
|
||||
openRecordInEditMode: false,
|
||||
|
||||
textStyles: {
|
||||
noWrapFields: [],
|
||||
},
|
||||
})
|
||||
|
||||
export class PageBlockRecordList extends PageBlock {
|
||||
@@ -150,7 +158,7 @@ export class PageBlockRecordList extends PageBlock {
|
||||
'recordDisplayOption',
|
||||
'magnifyOption',
|
||||
'recordSelectorDisplayOption',
|
||||
'addRecordDisplayOption'
|
||||
'addRecordDisplayOption',
|
||||
)
|
||||
|
||||
Apply(this.options, o, Number, 'perPage', 'refreshRate')
|
||||
@@ -205,6 +213,10 @@ export class PageBlockRecordList extends PageBlock {
|
||||
if (o.selectionButtons) {
|
||||
this.options.selectionButtons = o.selectionButtons.map(b => new Button(b))
|
||||
}
|
||||
|
||||
if (o.textStyles) {
|
||||
this.options.textStyles = o.textStyles
|
||||
}
|
||||
}
|
||||
|
||||
async fetch (api: ComposeAPI, recordListModule: Module, filter: {[_: string]: unknown}): Promise<object> {
|
||||
|
||||
Reference in New Issue
Block a user