From 72633423780ea2cf1a005f944319cb172317be40 Mon Sep 17 00:00:00 2001 From: Mark Chris Levy Date: Tue, 17 Aug 2021 20:47:41 +0200 Subject: [PATCH 1/3] fix custom transition opts will always have animationBuilder prop when used with ion-router and this fix will make sure, that animationBuilder will be set with appropriate value --- core/src/components/nav/nav.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/components/nav/nav.tsx b/core/src/components/nav/nav.tsx index 7bedccf67fe..bdb10d9719e 100644 --- a/core/src/components/nav/nav.tsx +++ b/core/src/components/nav/nav.tsx @@ -872,14 +872,15 @@ export class Nav implements NavOutlet { mode, showGoBack: this.canGoBackSync(enteringView), baseEl: this.el, - animationBuilder: this.animation || opts.animationBuilder || config.get('navAnimation'), progressCallback, animated: this.animated && config.getBoolean('animated', true), enteringEl, leavingEl, - ...opts + ...opts, + + animationBuilder: opts.animationBuilder || this.animation || config.get('navAnimation') }; const { hasCompleted } = await transition(animationOpts); return this.transitionFinish(hasCompleted, enteringView, leavingView, opts); From d04a52e2ff25c1d24fc90c65ec3a9ca91d729671 Mon Sep 17 00:00:00 2001 From: levy Date: Tue, 17 Aug 2021 21:38:51 +0200 Subject: [PATCH 2/3] Fix lint --- core/src/components/nav/nav.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/components/nav/nav.tsx b/core/src/components/nav/nav.tsx index bdb10d9719e..b75fceae01a 100644 --- a/core/src/components/nav/nav.tsx +++ b/core/src/components/nav/nav.tsx @@ -879,7 +879,7 @@ export class Nav implements NavOutlet { leavingEl, ...opts, - + animationBuilder: opts.animationBuilder || this.animation || config.get('navAnimation') }; const { hasCompleted } = await transition(animationOpts); From 0ad606b6334332d4c2e2f0cc140803c7dd954cc2 Mon Sep 17 00:00:00 2001 From: levy Date: Wed, 18 Aug 2021 09:33:02 +0200 Subject: [PATCH 3/3] fix router outlet --- core/src/components/router-outlet/route-outlet.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/components/router-outlet/route-outlet.tsx b/core/src/components/router-outlet/route-outlet.tsx index fe813998023..5e8e036e51e 100644 --- a/core/src/components/router-outlet/route-outlet.tsx +++ b/core/src/components/router-outlet/route-outlet.tsx @@ -188,7 +188,7 @@ export class RouterOutlet implements ComponentInterface, NavOutlet { const { el, mode } = this; const animated = this.animated && config.getBoolean('animated', true); - const animationBuilder = this.animation || opts.animationBuilder || config.get('navAnimation'); + const animationBuilder = opts.animationBuilder || this.animation || config.get('navAnimation'); await transition({ mode,