-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Closed
Labels
scope: tooltipChanges related to the tooltip.Changes related to the tooltip.type: new featureExpand the scope of the product to solve a new problem.Expand the scope of the product to solve a new problem.
Description
The DOM elements for Tooltip
s, Select
s, etc render in the body
tag in the DOM. I need them scoped into another DOM element. How can I achieve this?
I was able to achieve this with Modal
s by specifying the container
attribute and pointing to a ref
, but this does not work for other elements. Additionally, wrapping things in a Portal
does not do anything.
No dice:
<Portal container={appContainer}>
<Tooltip enterDelay={300} title='Zoom'>
<Select
className='zoom'
onChange={changeZoomLevel}
value={viewPort.zoom}
>
<MenuItem value={50}>50%</MenuItem>
<MenuItem value={75}>75%</MenuItem>
<MenuItem value={90}>90%</MenuItem>
<MenuItem value={100}>100%</MenuItem>
<MenuItem value={125}>125%</MenuItem>
<MenuItem value={150}>150%</MenuItem>
<MenuItem value={200}>200%</MenuItem>
</Select>
</Tooltip>
</Portal>
Metadata
Metadata
Assignees
Labels
scope: tooltipChanges related to the tooltip.Changes related to the tooltip.type: new featureExpand the scope of the product to solve a new problem.Expand the scope of the product to solve a new problem.