I asked a question about a week ago that was answered, and to what I thought was great. There is a bug with the solution that I came up with.
I have created a Plunker to show what is going on with what I'm doing. if anyone could please tell me that would be great.
I added the following code in the dropdown component to do what is being done in the post above.
@ViewChild('dropdown') dropdown:ElementRef;
ngDoCheck(): void {
if (this.dropdown.nativeElement.classList.contains('open')) {
this.dropdown.nativeElement.style.position = 'absolute';
this.dropdown.nativeElement.style.offsetTop = this.dropdown.nativeElement.style.top;
this.dropdown.nativeElement.style.offsetLeft = this.dropdown.nativeElement.style.left;
} else {
this.dropdown.nativeElement.style.position = 'relative';
}
}
Thank you for your time.