Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Calculator

0

38
Views
How to pass placement prop updated by flip from Popper to child Transition

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>
7 months ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post job Plans Our process Sales
Legal
Terms and conditions Privacy policy
© 2023 PeakU Inc. All Rights Reserved.