From 82d9538383cc451dd2a11da75a130d2b185312f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=91=E9=9B=A8?= Date: Mon, 9 Jan 2023 15:49:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D!removeOnLeave=20?= =?UTF-8?q?=E5=9B=A0=E4=B8=BA=E6=B2=A1=E6=9C=89=20leavedCLassName=20?= =?UTF-8?q?=E8=80=8C=E8=B5=B0=E5=88=B0=E6=9C=80=E5=90=8E=E7=9A=84=20motion?= =?UTF-8?q?Children=20=3D=20null=20=E5=88=86=E6=94=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/CSSMotion.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CSSMotion.tsx b/src/CSSMotion.tsx index 2ef1fe7..da82ba4 100644 --- a/src/CSSMotion.tsx +++ b/src/CSSMotion.tsx @@ -190,7 +190,7 @@ export function genCSSMotion( { ...mergedProps, className: leavedClassName }, setNodeRef, ); - } else if (forceRender) { + } else if ( forceRender || (!removeOnLeave && !leavedClassName)) { motionChildren = children( { ...mergedProps, style: { display: 'none' } }, setNodeRef,