summaryrefslogtreecommitdiffstats
path: root/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-metadata/dictionary-metadata.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-metadata/dictionary-metadata.component.ts')
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-metadata/dictionary-metadata.component.ts18
1 files changed, 12 insertions, 6 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-metadata/dictionary-metadata.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-metadata/dictionary-metadata.component.ts
index 631a0fffd..01df118d2 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-metadata/dictionary-metadata.component.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-metadata/dictionary-metadata.component.ts
@@ -37,8 +37,6 @@ export class DictionaryMetadataComponent implements OnInit {
errorMessage: string;
constructor(
- private route: ActivatedRoute,
- private dictionaryCreationService: DictionaryCreationService,
private dictionaryCreationStore: DictionaryCreationStore
) { }
@@ -67,6 +65,7 @@ export class DictionaryMetadataComponent implements OnInit {
removeTag(value) {
this.tags.delete(value);
+ this.mergeTags();
}
@@ -74,15 +73,22 @@ export class DictionaryMetadataComponent implements OnInit {
const value = event.target.value;
console.log(value);
if (value && value.trim().length > 0) {
- let tag = '';
event.target.value = '';
this.tags.add(value);
- this.tags.forEach(val => {
- tag += val + ', ';
- });
+ // merge
+ this.mergeTags();
}
}
+ mergeTags() {
+ let tag = '';
+ this.tags.forEach((val, index) => {
+ tag += val + ', ';
+ });
+ this.metaDataTab.tags = tag.trim();
+ this.saveMetaDataToStore();
+ }
+
saveMetaDataToStore() {
console.log(this.metaDataTab);
this.dictionaryCreationStore.changeMetaData(this.metaDataTab);