You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As title, exit animation will trigger only before expanding animation will completes and disclosure is closed instantly.
Animating straight the DisclosurePanel is even worse because some side-effect will cause animation stutterings (maybe to related to suggested "height: "auto" is jumping" on the Faqs below in this template)
3. IMPORTANT: Provide a CodeSandbox reproduction of the bug
Click again on button to close disclosure and see that it closes instantly
To see exit animation, quickly click again on button to close disclosure before -- animation complete --` log
5. Expected behavior
Exit animation should trigger even after animation completed
6. Video or screenshots
7. Environment details
React 17.0.2
Styled components 5.3.5
Reach/Disclosure 0.17.0
Framer Motion 6.3.11
FAQs
height: "auto" is jumping
Animating to/from auto requires measuring the DOM. There's no perfect way to do this and if you have also applied padding to the same element, these measurements might be wrong.
The recommended solution is to move padding to a child element. See this issue for the full discussion.
Type error with AnimateSharedLayout
AnimateSharedLayout was deprecated in 5.0. Refer to the upgrade guide for instructions on how to remove.
Preact isn't working
Framer Motion isn't compatible with Preact.
AnimatePresence isn't working
Have all of its immediate children got a unique key prop that remains the same for that component every render?
// Bad: The index could be given to a different component if the order of items changes<AnimatePresence>{items.map((item,index)=><Componentkey={index}/>)}</AnimatePresence>
// Good: The item ID is unique to each component<AnimatePresence>{items.map((item,index)=><Componentkey={item.id}/>)}</AnimatePresence>
Is the AnimatePresence correctly outside of the controlling conditional? AnimatePresence must be rendered whenever you expect an exit animation to run - it can't do so if it's unmounted!
// Bad: AnimatePresence is unmounted - exit animations won't run{isVisible&&(<AnimatePresence><Component/></AnimatePresence>)}
// Good: Only the children are unmounted - exit animations will run<AnimatePresence>{isVisible&&<Component/>}</AnimatePresence>
The text was updated successfully, but these errors were encountered:
Polm1
changed the title
[BUG] With Reach Disclosure exit animation won't trigger after animation complete
[BUG] With Reach Disclosure exit animation won't trigger after expanding animation completes
Jun 9, 2022
Polm1
changed the title
[BUG] With Reach Disclosure exit animation won't trigger after expanding animation completes
[BUG] Exit animation won't trigger after expanding animation of Reach Disclosure completes
Jun 9, 2022
1. Read the FAQs 馃憞
2. Describe the bug
As title, exit animation will trigger only before expanding animation will completes and disclosure is closed instantly.
Animating straight the
DisclosurePanel
is even worse because some side-effect will cause animation stutterings (maybe to related to suggested "height: "auto"
is jumping" on the Faqs below in this template)3. IMPORTANT: Provide a CodeSandbox reproduction of the bug
https://codesandbox.io/s/framer-motion-reach-disclosure-0dvljh?file=/src/Example.tsx
4. Steps to reproduce
Steps to reproduce the behavior:
-- animation complete --
logTo see exit animation, quickly click again on button to close disclosure before -- animation complete --` log
5. Expected behavior
Exit animation should trigger even after animation completed
6. Video or screenshots
7. Environment details
React 17.0.2
Styled components 5.3.5
Reach/Disclosure 0.17.0
Framer Motion 6.3.11
FAQs
height: "auto"
is jumpingAnimating to/from
auto
requires measuring the DOM. There's no perfect way to do this and if you have also applied padding to the same element, these measurements might be wrong.The recommended solution is to move padding to a child element. See this issue for the full discussion.
Type error with
AnimateSharedLayout
AnimateSharedLayout
was deprecated in 5.0. Refer to the upgrade guide for instructions on how to remove.Preact isn't working
Framer Motion isn't compatible with Preact.
AnimatePresence
isn't workingHave all of its immediate children got a unique
key
prop that remains the same for that component every render?Is the
AnimatePresence
correctly outside of the controlling conditional?AnimatePresence
must be rendered whenever you expect anexit
animation to run - it can't do so if it's unmounted!The text was updated successfully, but these errors were encountered: