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