Skip to content

Commit

Permalink
fix: remove initial dropdown append logic from updateDropdownPosition
Browse files Browse the repository at this point in the history
  • Loading branch information
anjmao committed Apr 25, 2018
1 parent 783ee3a commit ea06c64
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/ng-select/ng-dropdown-panel.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ export class NgDropdownPanelComponent implements OnInit, OnChanges, OnDestroy, A

ngAfterContentInit() {
this._whenContentReady().then(() => {
if (this.appendTo) {
this._appendDropdown();
this._handleDocumentResize();
}
this.updateDropdownPosition();
});
}
Expand Down Expand Up @@ -160,11 +164,6 @@ export class NgDropdownPanelComponent implements OnInit, OnChanges, OnDestroy, A
}

updateDropdownPosition() {
if (this.appendTo) {
this._appendDropdown();
this._handleDocumentResize();
}

const dropdownEl: HTMLElement = this._elementRef.nativeElement;
this._currentPosition = this._calculateCurrentPosition(dropdownEl);
const selectEl: HTMLElement = this._selectElement;
Expand Down

0 comments on commit ea06c64

Please sign in to comment.