Skip to content

Commit

Permalink
fix(core): ensure reset respects dashboard config
Browse files Browse the repository at this point in the history
  • Loading branch information
bramzijp-code committed Mar 3, 2024
1 parent 5c0219d commit 80d6824
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion libs/core/src/state/createMock.slice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ export const slice = createSlice({
resetAll: (state) => {
state.ids.forEach((id) => {
const parameters = state.entities[id].parameters;
state.entities[id].isActive = true;
state.entities[id].isActive =
state.entities[id].dashboardConfig?.isActiveByDefault ?? true;
state.entities[id].isExpanded = false;
if (parameters) {
Object.keys(parameters).forEach((key) => {
Expand Down
3 changes: 2 additions & 1 deletion libs/core/src/state/createScenario.slice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ export const slice = createSlice({
}),
resetAll: (state) => {
state.ids.forEach((id) => {
state.entities[id].isActive = true;
state.entities[id].isActive =
state.entities[id].dashboardConfig?.isActiveByDefault ?? true;
state.entities[id].isExpanded = false;
});
},
Expand Down

0 comments on commit 80d6824

Please sign in to comment.