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

Fixed OP#45451 by subscribing onReady of WorkPackageViewHighlightingService

Torben Köhler6dba5c3ae9ec
diff --git a/frontend/src/app/features/work-packages/components/wp-grid/wp-grid.component.ts b/frontend/src/app/features/work-packages/components/wp-grid/wp-grid.component.ts
index 0706360a4bb..3ad271ff5f0 100644
--- a/frontend/src/app/features/work-packages/components/wp-grid/wp-grid.component.ts
+++ b/frontend/src/app/features/work-packages/components/wp-grid/wp-grid.component.ts
@@ -105,16 +105,15 @@ export class WorkPackagesGridComponent implements WorkPackageViewOutputs {
this.dragInto = this.configuration.dragAndDropEnabled;
this.canDragOutOf = () => this.configuration.dragAndDropEnabled;
+ this.wpTableHighlight.onReady().then(() => this.highlightingModeChanged());
+
this.wpTableHighlight
.updates$()
.pipe(
takeUntil(this.querySpace.stopAllSubscriptions),
distinctUntilChanged(),
)
- .subscribe(() => {
- this.highlightingMode = this.wpTableHighlight.current.mode;
- this.cdRef.detectChanges();
- });
+ .subscribe(() => this.highlightingModeChanged());
}
public switchToManualSorting() {
@@ -123,4 +122,10 @@ export class WorkPackagesGridComponent implements WorkPackageViewOutputs {
void this.wpList.createOrSave(query);
}
}
+
+ private highlightingModeChanged(): void {
+ console.log("NOW")
+ this.highlightingMode = this.wpTableHighlight.current.mode;
+ this.cdRef.detectChanges();
+ }
}