Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Fix 'ExpressionChangedAfterItHasBeenCheckedError' in form configuration

Wieland Lindenthal81f986a807a9
diff --git a/frontend/src/app/modules/admin/types/group-edit-in-place.component.ts b/frontend/src/app/modules/admin/types/group-edit-in-place.component.ts
index 00e2014e97d..3dad168189b 100644
--- a/frontend/src/app/modules/admin/types/group-edit-in-place.component.ts
+++ b/frontend/src/app/modules/admin/types/group-edit-in-place.component.ts
@@ -26,7 +26,15 @@
// See docs/COPYRIGHT.rdoc for more details.
//++
-import {ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
+import {
+ ChangeDetectionStrategy,
+ ChangeDetectorRef,
+ Component,
+ EventEmitter,
+ Input,
+ OnInit,
+ Output
+} from '@angular/core';
import {TypeBannerService} from 'core-app/modules/admin/types/type-banner.service';
@Component({
@@ -44,7 +52,8 @@ export class GroupEditInPlaceComponent implements OnInit {
public editedName:string;
- constructor(private bannerService:TypeBannerService) {
+ constructor(private bannerService:TypeBannerService,
+ protected readonly cdRef:ChangeDetectorRef) {
}
ngOnInit():void {
@@ -69,6 +78,8 @@ export class GroupEditInPlaceComponent implements OnInit {
this.leaveEditingMode();
this.name = this.editedName.trim();
+ this.cdRef.detectChanges();
+
if (this.name !== '') {
this.onValueChange.emit(this.name);
}