mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
fix(dashboard): properly unset mountedTab in reducer (#11558)
This commit is contained in:
parent
d999802795
commit
ef7087adb6
@ -124,13 +124,16 @@ export default function dashboardStateReducer(state = {}, action) {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
[SET_DIRECT_PATH]() {
|
[SET_DIRECT_PATH]() {
|
||||||
return {
|
const newState = {
|
||||||
...state,
|
...state,
|
||||||
// change of direct path (tabs) will reset current mounted tab
|
|
||||||
mountedTab: null,
|
|
||||||
directPathToChild: action.path,
|
directPathToChild: action.path,
|
||||||
directPathLastUpdated: Date.now(),
|
directPathLastUpdated: Date.now(),
|
||||||
};
|
};
|
||||||
|
// change of direct path (tabs) will reset current mounted tab
|
||||||
|
// cannot just set mountedTab to null,
|
||||||
|
// as that is used when transitioning between tabs.
|
||||||
|
delete newState.mountedTab;
|
||||||
|
return newState;
|
||||||
},
|
},
|
||||||
[SET_MOUNTED_TAB]() {
|
[SET_MOUNTED_TAB]() {
|
||||||
// set current mounted tab after tab is really mounted to DOM
|
// set current mounted tab after tab is really mounted to DOM
|
||||||
|
Loading…
Reference in New Issue
Block a user