I have a select and a Dropdown from the primereact
library, arranged as such:
<div>
<SelectComponent
/>
</div>
Inside SelectComponent:
<div>
<Dropdown
/>
</div>
The problem is that the Dropdown content renders far away from the container div, and so when I try to set the width of the parent div to width: min-content
, it doesn't work, because they aren't actually related elements in the DOM.
How should I proceed then? I would preferentially like to do this in CSS only.