DashboardPage: Update pageNav url when folders differ (#68838)

Check if folder is different and update URL
This commit is contained in:
Tobias Skarhed
2023-05-23 17:11:48 +02:00
committed by GitHub
parent 07e794c312
commit c4242b8c5e

View File

@@ -426,7 +426,7 @@ function updateStatePageNavFromProps(props: Props, state: State): State {
let pageNav = state.pageNav;
let sectionNav = state.sectionNav;
if (!pageNav || dashboard.title !== pageNav.text) {
if (!pageNav || dashboard.title !== pageNav.text || dashboard.meta.folderUrl !== pageNav.parentItem?.url) {
pageNav = {
text: dashboard.title,
url: locationUtil.getUrlForPartial(props.history.location, {