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

Also render baseline when refreshing cell

Oliver Günther20d86ea84a20
diff --git a/frontend/src/app/features/work-packages/components/wp-fast-table/builders/cell-builder.ts b/frontend/src/app/features/work-packages/components/wp-fast-table/builders/cell-builder.ts
index a7da3f804cd..6ce287fe72c 100644
--- a/frontend/src/app/features/work-packages/components/wp-fast-table/builders/cell-builder.ts
+++ b/frontend/src/app/features/work-packages/components/wp-fast-table/builders/cell-builder.ts
@@ -45,24 +45,26 @@ export class CellBuilder {
}
const container = document.createElement('span');
- container.classList.add(editCellContainer, editFieldContainerClass, attribute);
-
- if (attribute !== 'id' && this.wpTableBaseline.isActive()) {
- this.prependChanges(container, workPackage, schema.mappedName(attribute));
- }
-
- const displayElement = this.fieldRenderer.render(workPackage, attribute, null);
-
- container.appendChild(displayElement);
+ this.render(container, workPackage, attribute);
td.appendChild(container);
return td;
}
public refresh(container:HTMLElement, workPackage:WorkPackageResource, attribute:string) {
- const displayElement = this.fieldRenderer.render(workPackage, attribute, null);
-
container.innerHTML = '';
+ this.render(container, workPackage, attribute);
+ }
+
+ private render(container:HTMLElement, workPackage:WorkPackageResource, attribute:string) {
+ const schema = this.schemaCache.of(workPackage);
+ container.classList.add(editCellContainer, editFieldContainerClass, attribute);
+
+ if (attribute !== 'id' && this.wpTableBaseline.isActive()) {
+ this.prependChanges(container, workPackage, schema.mappedName(attribute));
+ }
+
+ const displayElement = this.fieldRenderer.render(workPackage, attribute, null);
container.appendChild(displayElement);
}