I have a Popper component from mui v.5.6.2 I want to use the 'placement' prop of the popper, which is initially set to auto-start, to pass it to the child transition of such popper, only once it updates to either right-start or left-start, by setting those as the only values available. Trouble is, I haven't been able to make it await for the update from auto-start, since the child takes the value asychronously, causing every logic I've tried to fail.
Here's a small sample of what I'm saying
<Popper id={id} placement="auto-start" open={open} anchorEl={anchorEl} transition>
{({ TransitionProps }) => (
<Slide {...TransitionProps} timeout={350} direction={conditionalRightLeftFromPlacementValue}>
<Box sx={{ border: 1, p: 1, bgcolor: 'background.paper' }}>
The content of the Popper.
</Box>
</Slide>
)}
</Popper>