-
Notifications
You must be signed in to change notification settings - Fork 27
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
Position of Popover content is incorrect on first click inside Table. #49
Comments
Thank you @venkatfrequent for submitting this issue! To better help debug, could you please provide a snippet of your code implementing the popover? I attempted to reproduce by putting a popover within a table, but did not see any unwanted behaviors. |
same for me. that happens when trying to affect the popover size when using
if i remove the |
@estellechvl Thank you for your comment! I have confirmed that there is an issue with placement when using the |
I'm seeing a similar problem using this throughout my app - in this instance I'm not using a table but Is there any news of a fix? Thanks! |
I also see this when popoverSize is used. Any update on when a fix will be available? |
I've came out with a hack rather than a fix, you just need to call import {
Component,
ViewChild,
} from '@angular/core';
import { PopoverContentComponent } from 'ngx-smart-popover';
import { PopoverProps } from './model/popover';
@Component({
selector: 'popover',
templateUrl: './popover.component.html',
styleUrls: ['./popover.component.scss'],
})
export class PopoverComponent {
@ViewChild('popoverContentRef') element: PopoverContentComponent | undefined;
}
onOpen() {
this.element?.updatePosition();
}
} And in template i've just added event listener for click <div
(click)="onOpen()"
[popover]="popoverContentRef"
>
Open popover
</div>
<popover-content #popoverContentRef>
<div>Popover Content</div>
</popover-content> |
I have the popover Button inside a table. but on first click the popover content shows on center of the screen .Second click is shown on the correct spot (which is on the TD cell).
The text was updated successfully, but these errors were encountered: