Skip to content
Snippets Groups Projects
Commit 52b1fbb6 authored by Stefan Plociennik's avatar Stefan Plociennik
Browse files

added focus on edit textfield

parent 2d341fc1
No related merge requests found
......@@ -63,7 +63,7 @@
<mat-form-field>
<mat-label>{{'topic-cloud-dialog.editkeyword-tipp' | translate}}</mat-label>
<input matInput [(ngModel)]="newKeyword" cdkFocusInitial>
<input matInput #keywordInput [(ngModel)]="newKeyword">
</mat-form-field>
<!-- TODO: textinput and buttons in one row -->
<div align="end">
......
......@@ -14,7 +14,7 @@ import { LanguageService } from '../../../../services/util/language.service';
styleUrls: ['./topic-cloud-administration.component.scss']
})
export class TopicCloudAdministrationComponent implements OnInit {
// @ViewChildren("keywordInput") keywordInput: QueryList<ElementRef>;
public panelOpenState = false;
public considerVotes: boolean; // should be sent back to tagCloud component
public tagsLowerCase: boolean; // should be sent back to tagCloud component
......@@ -156,6 +156,14 @@ export class TopicCloudAdministrationComponent implements OnInit {
editKeyword(): void {
this.edit = true;
// focus on input currently trows exception
// this.keywordInput.changes.subscribe(() => {
// if (this.keywordInput.first.nativeElement && this.edit) {
// this.keywordInput.first.nativeElement.focus();
// }
// });
}
deleteKeyword(id: number): void{
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment