Fixes the field order sort issue
This commit is contained in:
@@ -416,7 +416,7 @@ export default {
|
||||
list[nodeID] = {}
|
||||
|
||||
for (const sm of this.sharedModules[nodeID]) {
|
||||
let f = sm.fields.sort((a, b) => a.label.localeCompare(b.label))
|
||||
let f = [...sm.fields].sort((a, b) => a.label.localeCompare(b.label))
|
||||
|
||||
// is there any mappings for this shared module?
|
||||
const mappedFields = ((this.moduleMappings[nodeID] || {})[sm.moduleID] || {}).fields || []
|
||||
|
||||
@@ -125,23 +125,20 @@ export default {
|
||||
},
|
||||
|
||||
options () {
|
||||
let mFields = []
|
||||
if (this.fieldSubset) {
|
||||
mFields = this.module.filterFields(this.fieldSubset)
|
||||
} else {
|
||||
mFields = this.module.fields
|
||||
}
|
||||
let mFields = [...(this.fieldSubset ? this.module.filterFields(this.fieldSubset) : this.module.fields)]
|
||||
|
||||
if (this.disabledTypes.length > 0) {
|
||||
mFields = mFields.filter(({ kind }) => !this.disabledTypes.find(t => t === kind))
|
||||
}
|
||||
|
||||
let sysFields = []
|
||||
|
||||
if (!this.disableSystemFields) {
|
||||
sysFields = this.module.systemFields().map(sf => {
|
||||
sf.label = this.$t(`field:system.${sf.name}`)
|
||||
return sf
|
||||
})
|
||||
|
||||
if (this.systemFields) {
|
||||
sysFields = sysFields.filter(({ name }) => this.systemFields.find(sf => sf === name))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user