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
Feature: support alternative forms of building a popover #23
Comments
This is a big one for me. We have a large list of items, each with multiple popover triggers (think a table). It would be nice to be able to use event delegation to register a single listener on the parent, and then open the popover with a service and position it based on the |
It would be easiest (for now) to just support passing a popover instance to not have to duplicate the Input bindings in the service api. Are you thinking something like this would work? @ViewChild('editPopover') editPopover;
@ViewChild('deletePopover') deletePopover;
openEditPopoverAt(targetEl) {
this.satPopoverService.open(this.editPopover, {anchor: targetEl});
} For your use case, is there any value difference in passing a popover instance vs. template ref vs. component class? |
My original motivation for wanting this was to keep the DOM as light as possible. So rather than having 4 Because of this, I suppose my ideal use-case would avoid needing to have the Edit: I understand these are just pie-in-the-sky discussions, and my ideas aren't necessarily simple to implement. |
Ahh I see. AFAIK a popover's content won't pollute the DOM until it's opened, but I understand not wanting 100s or 1000s of popover instances hanging around in memory until they're needed. So effectively like MatDialog but with the ability to anchor to an element? It would return some popover ref that you could use to close it or whatever. And out of curiosity, for this use case, would you need more than one popover open at a time? |
Yeah exactly. And you're right about the popover content not polluting. I'm
just developing for some fairly performance constrained devices so every
little bit counts
…On Nov 18, 2017 3:48 PM, "Will Howell" ***@***.***> wrote:
Ahh I see. AFAIK a popover's content won't pollute the DOM until it's
opened, but I understand not wanting 100s or 1000s of popover instances
hanging around in memory until they're needed.
So effectively like MatDialog but with the ability to anchor to an
element? It would return some popover ref that you could use to close it or
whatever.
And out of curiosity, for this use case, would you need more than one
popover open at a time?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAoF9PMHJ8L3GAOw-U1KAuJapdmsnSi7ks5s30KogaJpZM4Pc43G>
.
|
The text was updated successfully, but these errors were encountered: