diff options
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-metadata')
2 files changed, 13 insertions, 7 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-metadata/dictionary-metadata.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-metadata/dictionary-metadata.component.html index add21e9e1..8e355449b 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-metadata/dictionary-metadata.component.html +++ b/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-metadata/dictionary-metadata.component.html @@ -78,7 +78,7 @@ <div class="single-line-model"> <label class="label-name">Tags</label> <div class="label-input"> - <input type="input" (keyup.enter)="addTag($event)" [(ngModel)]="metaDataTab.tags" + <input type="input" (keyup.enter)="addTag($event)" placeholder="Ex., vDNS-CDS"> </div> 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); |