From e925f34b4757f67ba29a0648e9e2ecfe98d8bd13 Mon Sep 17 00:00:00 2001 From: bsatarnejad Date: Mon, 19 Sep 2022 17:46:39 +0200 Subject: [PATCH] check if appendTo is set then update the position --- .../op-autocompleter/op-autocompleter.component.ts | 2 +- .../user-autocompleter/user-autocompleter.component.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/shared/components/autocompleter/op-autocompleter/op-autocompleter.component.ts b/frontend/src/app/shared/components/autocompleter/op-autocompleter/op-autocompleter.component.ts index d97d1df662..66be53b237 100644 --- a/frontend/src/app/shared/components/autocompleter/op-autocompleter/op-autocompleter.component.ts +++ b/frontend/src/app/shared/components/autocompleter/op-autocompleter/op-autocompleter.component.ts @@ -278,7 +278,7 @@ export class OpAutocompleterComponent extends UntilDestroyedMixin implements OnI setTimeout(() => { this.cdRef.detectChanges(); const component = this.ngSelectInstance; - if (component && component.dropdownPanel) { + if (this.appendTo && component && component.dropdownPanel) { // eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-explicit-any,@typescript-eslint/no-unsafe-member-access,no-underscore-dangle (component.dropdownPanel as any)._updatePosition(); } diff --git a/frontend/src/app/shared/components/autocompleter/user-autocompleter/user-autocompleter.component.ts b/frontend/src/app/shared/components/autocompleter/user-autocompleter/user-autocompleter.component.ts index b29cb53092..83a4440151 100644 --- a/frontend/src/app/shared/components/autocompleter/user-autocompleter/user-autocompleter.component.ts +++ b/frontend/src/app/shared/components/autocompleter/user-autocompleter/user-autocompleter.component.ts @@ -106,7 +106,7 @@ export class UserAutocompleterComponent extends UntilDestroyedMixin implements O //