MOBILE-3738 navigation: Fix nested split-views
parent
21ccad82f0
commit
6d9cc0e235
|
@ -154,12 +154,10 @@ export abstract class CorePageItemsListManager<Item> {
|
|||
|
||||
// Navigate to item.
|
||||
const params = this.getItemQueryParams(item);
|
||||
const reset = this.resetNavigation();
|
||||
const pathPrefix = selectedItemPath ? selectedItemPath.split('/').fill('../').join('') : '';
|
||||
|
||||
await CoreNavigator.navigate(pathPrefix + itemPath, {
|
||||
params,
|
||||
reset: CoreScreen.isTablet,
|
||||
});
|
||||
await CoreNavigator.navigate(pathPrefix + itemPath, { params, reset });
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -200,6 +198,19 @@ export abstract class CorePageItemsListManager<Item> {
|
|||
: null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether to reset navigation when selecting an item.
|
||||
*
|
||||
* @returns boolean Whether navigation should be reset.
|
||||
*/
|
||||
protected resetNavigation(): boolean {
|
||||
if (!CoreScreen.isTablet) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return !this.splitView?.isNested;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the item that should be selected by default.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue