From 3eb8cc3ed573844d67b5f3af1cb2cb876fb32ce8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Mau=C3=9F?= <lukas.mauss@mni.thm.de> Date: Thu, 8 Nov 2018 02:22:18 +0100 Subject: [PATCH] Fix view and select collections for content-creation --- .../creator/content-creator/content-creator.component.html | 2 +- .../creator/content-creator/content-creator.component.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/components/creator/content-creator/content-creator.component.html b/src/app/components/creator/content-creator/content-creator.component.html index dd8db16a0..ea7f33d4c 100644 --- a/src/app/components/creator/content-creator/content-creator.component.html +++ b/src/app/components/creator/content-creator/content-creator.component.html @@ -12,7 +12,7 @@ <input matInput #group matInput [formControl]="myControl" [matAutocomplete]="auto" value={{lastCollection}} placeholder="{{'content.collection' | translate}}"/> <mat-autocomplete #auto="matAutocomplete"> - <mat-option *ngFor="let collection of collections" [value]="collection"> + <mat-option *ngFor="let collection of contentGroups" [value]="collection.name"> {{collection.name}} </mat-option> </mat-autocomplete> diff --git a/src/app/components/creator/content-creator/content-creator.component.ts b/src/app/components/creator/content-creator/content-creator.component.ts index 58fdc2b91..e5ae626c5 100644 --- a/src/app/components/creator/content-creator/content-creator.component.ts +++ b/src/app/components/creator/content-creator/content-creator.component.ts @@ -28,7 +28,7 @@ export class ContentCreatorComponent extends RoomPageComponent implements OnInit 1, [], ); - collections: ContentGroup[]; + contentGroups: ContentGroup[]; lastCollection: string; myControl = new FormControl(); @@ -52,8 +52,9 @@ export class ContentCreatorComponent extends RoomPageComponent implements OnInit getRoom(id: string): void { this.roomService.getRoomByShortId(id).subscribe(room => { - this.collections = room.contentGroups; + this.contentGroups = room.contentGroups; }); + } resetInputs() { -- GitLab