You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you use the TooltipInPortal inside a microfrontend remote, the tooltip was added to the html root level in the shell, and it's impossible to style it from the microfrontend remote.
Would be great to allow the tooltip to be placed where you decide, for example at the microfrontend root level.
I think that can be easily allowed adding an optional property that indicates the place to add the portal.
exporttypePortalProps={/** Optional z-index to set on the Portal. */zIndex?: number|string;/** Content to render in the Portal. */children: NonNullable<React.ReactNode>;/** Parent to render the Portal. */parent?: React.ReactNode;// <----------- NEW PROPERTY};
Also I think this property should have the default value: document.body to maintain the current behaviour and prevent the breaking change.
If you need more information or insights, I'll happy to help you!
Thanks!
The text was updated successfully, but these errors were encountered:
Hey @rafa-suarez-itx thanks for checking out visx and opening the issue. There's an open PR for this issue #1567, it's probably on me to review it as I dropped the ball. But It got far more complex than anticipated because the offset calculation of the tooltip depends on the ref that's used. Would love to land on a simpler implementation if possible.
Hi,
When you use the TooltipInPortal inside a microfrontend remote, the tooltip was added to the html root level in the shell, and it's impossible to style it from the microfrontend remote.
Would be great to allow the tooltip to be placed where you decide, for example at the microfrontend root level.
I think that can be easily allowed adding an optional property that indicates the place to add the portal.
The following code could be a solution:
from:
visx/packages/visx-tooltip/src/Portal.tsx
Lines 4 to 9 in dee0ac0
to:
Also I think this property should have the default value:
document.body
to maintain the current behaviour and prevent the breaking change.If you need more information or insights, I'll happy to help you!
Thanks!
The text was updated successfully, but these errors were encountered: