chore(react): fixing test and another method to tab nav

This commit is contained in:
Ely Lucas
2019-10-14 08:43:39 -06:00
parent 8935d4d1b6
commit 28d21ae55f
4 changed files with 11 additions and 4 deletions

View File

@ -33,7 +33,8 @@ export class NavManager extends React.Component<NavManagerProps, NavContextState
getStackManager: this.getStackManager.bind(this),
getPageManager: this.getPageManager.bind(this),
currentPath: this.props.location.pathname,
registerIonPage: () => { return; } // overridden in View for each IonPage
registerIonPage: () => { return; }, // overridden in View for each IonPage
tabNavigate: this.tabNavigate.bind(this)
};
this.listenUnregisterCallback = this.props.history.listen((location: HistoryLocation) => {
@ -93,6 +94,10 @@ export class NavManager extends React.Component<NavManagerProps, NavContextState
this.props.history.push(path, { direction });
}
tabNavigate(url: string) {
this.props.history.replace(url, { direction: 'back' });
}
getPageManager() {
return (children: any) => children;
}