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 repeatedly setting the value

ulfertse990870d7e93
diff --git a/frontend/src/app/modules/fields/edit/field-types/select-edit-field.component.ts b/frontend/src/app/modules/fields/edit/field-types/select-edit-field.component.ts
index f6d953c4e92..badaf7784ed 100644
--- a/frontend/src/app/modules/fields/edit/field-types/select-edit-field.component.ts
+++ b/frontend/src/app/modules/fields/edit/field-types/select-edit-field.component.ts
@@ -78,21 +78,6 @@ export class SelectEditFieldComponent extends EditFieldComponent implements OnIn
requiredPlaceholder: this.I18n.t('js.placeholders.selection'),
placeholder: this.I18n.t('js.placeholders.default')
};
-
- let loadingPromise = this.change.getForm().then(() => {
- return this.initialValueLoading();
- });
-
- this.handler
- .$onUserActivate
- .pipe(
- untilComponentDestroyed(this),
- )
- .subscribe(() => {
- loadingPromise.then(() => {
- this._autocompleterComponent.openDirectly = true;
- });
- });
}
protected initialValueLoading() {
@@ -108,6 +93,21 @@ export class SelectEditFieldComponent extends EditFieldComponent implements OnIn
public ngOnInit() {
super.ngOnInit();
this.appendTo = this.overflowingSelector;
+
+ let loadingPromise = this.change.getForm().then(() => {
+ return this.initialValueLoading();
+ });
+
+ this.handler
+ .$onUserActivate
+ .pipe(
+ untilComponentDestroyed(this),
+ )
+ .subscribe(() => {
+ loadingPromise.then(() => {
+ this._autocompleterComponent.openDirectly = true;
+ });
+ });
}
public get selectedOption() {