Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

374
Views
Material UI 5: How to know when Collapse transition is finished?

My code

    <Collapse
      in={expanded}
      onTransitionEnd={() => console.log('finished')}
    >
        <div>foo</div>
    </Collapse>

What's wrong

The callback (onTransitionEnd) is not called when the collapse animation is finished.

How should I do?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

There is no such a prop as onTransitionEnd neither in API of Collapse component, nor in the Transition component from react-transition-group.

Depending on what exactly you want you can use either addEndListener prop which will fire at the end of both 'in' and 'out' animations, or onExited which will fire at the end of 'out' animation.

          <Collapse
            addEndListener={() => console.log("done")}
            onExited={() => console.log("finished")}
            in={checked}
          >
            {icon}
          </Collapse>
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!