-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can I attach an OverlayPanel to something else than a button? #324
Comments
Sorry for the docs, we are implementing a new one and updating them, the The
Then, pass the input variable to I updated the stackblitz and we are updating the docs as soon as possible. Close this issue as your doubts are answered. Thank you for using truly-ui an helping to improve it. |
Thank you @WilliamAguera, the workaround works. Are you planning to generalize |
I found that the overlay panel that opens below my input field does not have the same width as the input field, and found the following workaround: @ViewChild('inputField', { static: true }) inputFieldRef; // : TlInput;
@ViewChild('inputField', { read: ElementRef, static: true }) inputFieldElem: ElementRef;
@ViewChild('browsingPanel', { static: true }) browsingPanelRef; // : TlOverlayPanel;
...
// (clickAddon) event on the TlInput
onClickAddon() {
this.browsingPanelRef.width = this.inputFieldElem.nativeElement.firstChild.offsetWidth + 'px';
this.browsingPanelRef.toggle();
} Is there a better way? |
I'm trying to attach an OverlayPanel to a
tl-input
: StackblitzThe panel does open, but it appears to be attached to the body element instead of the tl-input.
When attaching it to a
tl-button
as per your docs, it does work (see commented code in the html). Even then though, there seems to be something wrong with the panel, it has no background color.The text was updated successfully, but these errors were encountered: