Closed rossbulat closed 11 months ago
Following on from #150, this issue documents 2 improvements to the events UI:
When an event is dismissed by clicking the "x" icon, it instantly gets removed from the DOM instead of fading out (the desired behaviour).
According to the Framer Motion docs, each removed item needs to be surrounded with the <AnimatePresence> component, and have a unique key as specified here: https://www.framer.com/motion/animate-presence/##exit-animations
<AnimatePresence>
However, after providing a unique key by calling JSON.stringify(data), event items still don't fade out. I have removed the key prop, and the current code state is as follows:
JSON.stringify(data)
<AnimatePresence> <EventItem whileHover={{ scale: 1.01 }} initial={{ opacity: 0 }} animate={{ opacity: 1 }} exit={{ opacity: 0 }} > ... </AnimatePresence>
Resolved in #150
Following on from #150, this issue documents 2 improvements to the events UI:
Issue: Event item fade out when closed
When an event is dismissed by clicking the "x" icon, it instantly gets removed from the DOM instead of fading out (the desired behaviour).
According to the Framer Motion docs, each removed item needs to be surrounded with the
<AnimatePresence>
component, and have a unique key as specified here: https://www.framer.com/motion/animate-presence/##exit-animationsHowever, after providing a unique key by calling
JSON.stringify(data)
, event items still don't fade out. I have removed the key prop, and the current code state is as follows: