fix(vue): improve path matching when going back (#22275)

resolves #22258
This commit is contained in:
Liam DeBeasi
2020-10-13 16:04:55 -04:00
committed by GitHub
parent 52f655c9d4
commit b06ae16591
10 changed files with 748 additions and 35 deletions

View File

@ -7,7 +7,8 @@ import {
provide,
watch,
shallowRef,
InjectionKey
InjectionKey,
onUnmounted
} from 'vue';
import { AnimationBuilder } from '@ionic/core';
import { useRoute } from 'vue-router';
@ -307,6 +308,13 @@ export const IonRouterOutlet = defineComponent({
setupViewItem(matchedRouteRef);
}
/**
* Remove stack data for this outlet
* when outlet is destroyed otherwise
* we will see cached view data.
*/
onUnmounted(() => viewStacks.clear(id));
return {
id,
components,