Rename non-wrapping to wrapping fields in record list configurator
This commit is contained in:
@@ -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
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -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')
|
||||
}
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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') }}
|
||||
</column-picker>
|
||||
</b-form-group>
|
||||
</b-col>
|
||||
@@ -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)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
@@ -72,7 +72,7 @@ export interface Options {
|
||||
openRecordInEditMode: boolean;
|
||||
|
||||
textStyles: {
|
||||
noWrapFields: Array<string>
|
||||
wrappedFields: Array<string>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ const defaults: Readonly<Options> = 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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user