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 d2a30bc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 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 Expand Up @@ -356,6 +355,7 @@ export class NgDropdownPanelComponent implements OnInit, OnChanges, OnDestroy, A
return;
}
this._zone.runOutsideAngular(() => {
console.log('here')
setTimeout(() => ready(resolve), 5);
});
};
Expand Down

0 comments on commit d2a30bc

Please sign in to comment.