check if appendTo is set then update the position

pull/11290/head
bsatarnejad 2 years ago
parent 34ca00df4a
commit e925f34b47
  1. 2
      frontend/src/app/shared/components/autocompleter/op-autocompleter/op-autocompleter.component.ts
  2. 2
      frontend/src/app/shared/components/autocompleter/user-autocompleter/user-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();
}

@ -106,7 +106,7 @@ export class UserAutocompleterComponent extends UntilDestroyedMixin implements O
// <label> tags that have `for=""` set
@Input() public labelForId = '';
@Input() public appendTo = 'body';
@Input() public appendTo = '';
@Input() public multiple = false;

Loading…
Cancel
Save