mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-06 07:56:28 +08:00
feat: TooltipRef export popup element (#49230)
This commit is contained in:
parent
3934566134
commit
cad00f1a25
@ -34,6 +34,8 @@ export interface TooltipRef {
|
||||
forceAlign: VoidFunction;
|
||||
/** Wrapped dom element. Not promise valid if child not support ref */
|
||||
nativeElement: HTMLElement;
|
||||
/** Popup dom element */
|
||||
popupElement: HTMLDivElement;
|
||||
}
|
||||
|
||||
export type TooltipPlacement =
|
||||
@ -179,6 +181,7 @@ const InternalTooltip = React.forwardRef<TooltipRef, TooltipProps>((props, ref)
|
||||
forceAlign();
|
||||
},
|
||||
nativeElement: tooltipRef.current?.nativeElement!,
|
||||
popupElement: tooltipRef.current?.popupElement!,
|
||||
}));
|
||||
|
||||
// ============================== Warn ==============================
|
||||
|
Loading…
Reference in New Issue
Block a user