+
+
+
+
+
+ {{ $t('recordList.record.configureNonWrappingFelids') }}
+
+
+
@@ -825,6 +846,7 @@ import AutomationTab from './Shared/AutomationTab'
import FieldPicker from 'corteza-webapp-compose/src/components/Common/FieldPicker'
import RecordListFilter from 'corteza-webapp-compose/src/components/Common/RecordListFilter'
import { components } from '@cortezaproject/corteza-vue'
+import ColumnPicker from 'corteza-webapp-compose/src/components/Admin/Module/Records/ColumnPicker'
const { CInputPresort, CInputRole } = components
export default {
@@ -841,6 +863,7 @@ export default {
RecordListFilter,
Draggable,
CInputRole,
+ ColumnPicker,
},
extends: base,
@@ -880,6 +903,13 @@ export default {
]
},
+ textWrapDisplayOptions () {
+ return [
+ { value: 'text-wrap', text: this.$t('recordList.record.wrapText') },
+ { value: 'text-nowrap', text: this.$t('recordList.record.showFullText') },
+ ]
+ },
+
recordListModule () {
if (this.options.moduleID !== NoID) {
return this.getModuleByID(this.options.moduleID)
@@ -1050,6 +1080,12 @@ export default {
this.checkboxLabel = {}
this.resolvedRoles = {}
},
+
+ onUpdateTextWrapOption (fields = []) {
+ if (this.options.textStyles.noWrapFields) {
+ this.options.textStyles.noWrapFields = fields.map(f => f.fieldID)
+ }
+ },
},
}
diff --git a/lib/js/src/compose/types/page-block/record-list.ts b/lib/js/src/compose/types/page-block/record-list.ts
index 7bcf06ea1..7cdcceed2 100644
--- a/lib/js/src/compose/types/page-block/record-list.ts
+++ b/lib/js/src/compose/types/page-block/record-list.ts
@@ -69,6 +69,10 @@ export interface Options {
filterPresets: FilterPreset[];
showRecordPerPageOption: boolean;
openRecordInEditMode: boolean;
+
+ textStyles: {
+ noWrapFields: Array
+ }
}
const defaults: Readonly = Object.freeze({
@@ -124,6 +128,10 @@ const defaults: Readonly = 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