diff --git a/frontend/app/features/settings/pages/roles/role.component.ts b/frontend/app/features/settings/pages/roles/role.component.ts index e14eeb23f..5bc340e01 100644 --- a/frontend/app/features/settings/pages/roles/role.component.ts +++ b/frontend/app/features/settings/pages/roles/role.component.ts @@ -5,7 +5,7 @@ * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. */ -import { ChangeDetectionStrategy, Component, Input, OnChanges, ViewChild } from '@angular/core'; +import { ChangeDetectionStrategy, Component, Input, OnChanges, SimpleChanges, ViewChild } from '@angular/core'; import { FormBuilder } from '@angular/forms'; import { @@ -55,11 +55,13 @@ export class RoleComponent implements OnChanges { ) { } - public ngOnChanges() { - this.isEditable = this.role.canUpdate; + public ngOnChanges(changes: SimpleChanges) { + if (changes['role']) { + this.isEditable = this.role.canUpdate; - this.editForm.load(this.role); - this.editForm.setEnabled(this.isEditable); + this.editForm.load(this.role); + this.editForm.setEnabled(this.isEditable); + } } public toggleEditing() { diff --git a/frontend/app/framework/angular/forms/editors/autocomplete.component.ts b/frontend/app/framework/angular/forms/editors/autocomplete.component.ts index 2f5c5b00a..5181c2dc8 100644 --- a/frontend/app/framework/angular/forms/editors/autocomplete.component.ts +++ b/frontend/app/framework/angular/forms/editors/autocomplete.component.ts @@ -174,7 +174,7 @@ export class AutocompleteComponent extends StatefulControlComponent