diff --git a/client/web/compose/src/components/ModuleFields/Viewer/String.vue b/client/web/compose/src/components/ModuleFields/Viewer/String.vue index a731948c1e..733447f463 100644 --- a/client/web/compose/src/components/ModuleFields/Viewer/String.vue +++ b/client/web/compose/src/components/ModuleFields/Viewer/String.vue @@ -19,21 +19,5 @@ import base from './base' export default { extends: base, - - computed: { - classes () { - const classes = [] - const { fieldID } = this.field - const { textStyles = {} } = this.extraOptions - - if (this.field.isMulti || this.field.options.multiLine) { - classes.push('multiline') - } else if (textStyles.noWrapFields && textStyles.noWrapFields.includes(fieldID)) { - classes.push('text-nowrap') - } - - return classes - }, - }, } diff --git a/client/web/compose/src/components/ModuleFields/Viewer/base.vue b/client/web/compose/src/components/ModuleFields/Viewer/base.vue index ece81d2252..1d3676d43c 100644 --- a/client/web/compose/src/components/ModuleFields/Viewer/base.vue +++ b/client/web/compose/src/components/ModuleFields/Viewer/base.vue @@ -73,7 +73,7 @@ export default { if (this.field.isMulti) { classes.push('multiline') - } else if (textStyles.noWrapFields && textStyles.noWrapFields.includes(fieldID)) { + } else if (!textStyles.wrappedFields || !textStyles.wrappedFields.includes(fieldID)) { classes.push('text-nowrap') } diff --git a/client/web/compose/src/components/PageBlocks/RecordListBase.vue b/client/web/compose/src/components/PageBlocks/RecordListBase.vue index 4d73a5b794..8af069fa64 100644 --- a/client/web/compose/src/components/PageBlocks/RecordListBase.vue +++ b/client/web/compose/src/components/PageBlocks/RecordListBase.vue @@ -2298,15 +2298,19 @@ export default { cursor: pointer; } -th .required::after { - content: "*"; - display: inline-block; - color: var(--primary); - vertical-align: sub; - margin-left: 2px; - width: 10px; - height: 16px; - overflow: hidden; +th { + min-width: 13rem; + + &.required::after { + content: "*"; + display: inline-block; + color: var(--primary); + vertical-align: sub; + margin-left: 2px; + width: 10px; + height: 16px; + overflow: hidden; + } } tr:hover td.actions { diff --git a/client/web/compose/src/components/PageBlocks/RecordListConfigurator.vue b/client/web/compose/src/components/PageBlocks/RecordListConfigurator.vue index 6830072610..e0430ee805 100644 --- a/client/web/compose/src/components/PageBlocks/RecordListConfigurator.vue +++ b/client/web/compose/src/components/PageBlocks/RecordListConfigurator.vue @@ -141,11 +141,11 @@ size="sm" variant="light" :module="recordListModule" - :fields="options.textStyles.noWrapFields || []" + :fields="options.textStyles.wrappedFields || []" :field-subset="options.fields.length ? options.fields : recordListModule.fields" @updateFields="onUpdateTextWrapOption" > - {{ $t('recordList.record.configureNonWrappingFelids') }} + {{ $t('recordList.record.configureWrappedFields') }} @@ -1064,8 +1064,8 @@ export default { }, onUpdateTextWrapOption (fields = []) { - if (this.options.textStyles.noWrapFields) { - this.options.textStyles.noWrapFields = fields.map(f => f.fieldID) + if (this.options.textStyles.wrappedFields) { + this.options.textStyles.wrappedFields = 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 26bd55a546..17b01d92ef 100644 --- a/lib/js/src/compose/types/page-block/record-list.ts +++ b/lib/js/src/compose/types/page-block/record-list.ts @@ -72,7 +72,7 @@ export interface Options { openRecordInEditMode: boolean; textStyles: { - noWrapFields: Array + wrappedFields: Array } } @@ -132,7 +132,7 @@ const defaults: Readonly = Object.freeze({ openRecordInEditMode: false, textStyles: { - noWrapFields: [], + wrappedFields: [], }, }) @@ -218,7 +218,10 @@ export class PageBlockRecordList extends PageBlock { } if (o.textStyles) { - this.options.textStyles = o.textStyles + this.options.textStyles = { + ...this.options.textStyles, + ...o.textStyles, + } } } diff --git a/locale/en/corteza-webapp-compose/block.yaml b/locale/en/corteza-webapp-compose/block.yaml index 7bc6c96249..c1016b34eb 100644 --- a/locale/en/corteza-webapp-compose/block.yaml +++ b/locale/en/corteza-webapp-compose/block.yaml @@ -570,7 +570,7 @@ recordList: recordSelectorDisplayOptions: On record value click addRecordOptions: On add record click textStyles: Text Styles - configureNonWrappingFelids: Configure non-wrapping fields + configureWrappedFields: Select fields that will be wrapped showFullText: Show full text recordPage: record page refField: