Fix board animation (#2706)

fix-board-animation
This commit is contained in:
bosiraphael 2023-11-24 21:26:44 +01:00 committed by GitHub
parent 65aa91c774
commit 66162e6693
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -232,7 +232,7 @@ export const CompanyBoardCard = () => {
</StyledCheckboxContainer> </StyledCheckboxContainer>
</StyledBoardCardHeader> </StyledBoardCardHeader>
<StyledBoardCardBody> <StyledBoardCardBody>
<AnimatedEaseInOut isOpen={!showCompactView}> <AnimatedEaseInOut isOpen={!showCompactView} initial={false}>
{visibleBoardCardFields.map((viewField) => ( {visibleBoardCardFields.map((viewField) => (
<PreventSelectOnClickContainer key={viewField.fieldMetadataId}> <PreventSelectOnClickContainer key={viewField.fieldMetadataId}>
<FieldContext.Provider <FieldContext.Provider

View File

@ -9,6 +9,7 @@ type AnimatedEaseInOutProps = {
duration?: AnimationDuration; duration?: AnimationDuration;
marginBottom?: string; marginBottom?: string;
marginTop?: string; marginTop?: string;
initial?: boolean;
}; };
export const AnimatedEaseInOut = ({ export const AnimatedEaseInOut = ({
@ -17,11 +18,12 @@ export const AnimatedEaseInOut = ({
marginBottom, marginBottom,
marginTop, marginTop,
duration = 'normal', duration = 'normal',
initial = true,
}: AnimatedEaseInOutProps) => { }: AnimatedEaseInOutProps) => {
const theme = useTheme(); const theme = useTheme();
return ( return (
<AnimatePresence> <AnimatePresence initial={initial}>
{isOpen && ( {isOpen && (
<motion.div <motion.div
initial={{ initial={{