MCPcopy Index your code
hub / github.com/ionic-team/ionic-framework / Popover

Class Popover

core/src/components/popover/popover.tsx:58–768  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56 shadow: true,
57})
58export class Popover implements ComponentInterface, PopoverInterface {
59 private usersElement?: HTMLElement;
60 private triggerEl?: HTMLElement | null;
61 private parentPopover: HTMLIonPopoverElement | null = null;
62 private coreDelegate: FrameworkDelegate = CoreDelegate();
63 private readonly lockController = createLockController();
64 private destroyTriggerInteraction?: () => void;
65 private destroyKeyboardInteraction?: () => void;
66 private destroyDismissInteraction?: () => void;
67 private headerResizeObserver?: ResizeObserver;
68
69 private inline = false;
70 private workingDelegate?: FrameworkDelegate;
71
72 private focusDescendantOnPresent = false;
73
74 lastFocus?: HTMLElement;
75
76 @State() presented = false;
77
78 @Element() el!: HTMLIonPopoverElement;
79
80 /** @internal */
81 @Prop() hasController = false;
82
83 /** @internal */
84 @Prop() delegate?: FrameworkDelegate;
85
86 /** @internal */
87 @Prop() overlayIndex!: number;
88
89 /**
90 * Animation to use when the popover is presented.
91 */
92 @Prop() enterAnimation?: AnimationBuilder;
93
94 /**
95 * Animation to use when the popover is dismissed.
96 */
97 @Prop() leaveAnimation?: AnimationBuilder;
98
99 /**
100 * The component to display inside of the popover.
101 * You only need to use this if you are not using
102 * a JavaScript framework. Otherwise, you can just
103 * slot your component inside of `ion-popover`.
104 */
105 @Prop() component?: ComponentRef;
106
107 /**
108 * The data to pass to the popover component.
109 * You only need to use this if you are not using
110 * a JavaScript framework. Otherwise, you can just
111 * set the props directly on your component.
112 */
113 @Prop() componentProps?: ComponentProps;
114
115 /**

Callers

nothing calls this directly

Calls 7

dismissMethod · 0.95
CoreDelegateFunction · 0.90
createLockControllerFunction · 0.90
printIonWarningFunction · 0.90

Tested by

no test coverage detected