split out attribute_editor widget, WIP

This commit is contained in:
zadam
2020-07-17 23:55:59 +02:00
parent 9f527f0330
commit a94ae81c30
3 changed files with 114 additions and 75 deletions

View File

@@ -54,7 +54,7 @@ export default class PromotedAttributesWidget extends TabAwareWidget {
const definitionType = definitionAttr.name.startsWith('label:') ? 'label' : 'relation';
const valueName = definitionAttr.name.substr(definitionType.length + 1);
let valueAttrs = attributes.filter(el => el.name === definitionAttr.name && el.type === definitionType);
let valueAttrs = attributes.filter(el => el.name === valueName && el.type === 'label');
if (valueAttrs.length === 0) {
valueAttrs.push({