Skip to content
Snippets Groups Projects
Unverified Commit 7d413425 authored by Alexander Polyankin's avatar Alexander Polyankin Committed by GitHub
Browse files

Fix highlighting collections after moving a dashboard (#24170)

parent 82d451e9
No related branches found
Tags embedding-sdk-0.1.9
No related merge requests found
import { assoc, dissoc, assocIn, updateIn, chain, merge } from "icepick"; import { assoc, dissoc, assocIn, updateIn, chain, merge } from "icepick";
import { handleActions, combineReducers } from "metabase/lib/redux"; import { handleActions, combineReducers } from "metabase/lib/redux";
import Dashboards from "metabase/entities/dashboards";
import { import {
INITIALIZE, INITIALIZE,
...@@ -135,6 +136,14 @@ const dashboards = handleActions( ...@@ -135,6 +136,14 @@ const dashboards = handleActions(
payload.enable_embedding, payload.enable_embedding,
), ),
}, },
[Dashboards.actionTypes.UPDATE]: {
next: (state, { payload }) =>
assocIn(
state,
[payload.dashboard.id, "collection_id"],
payload.dashboard.collection_id,
),
},
}, },
{}, {},
); );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment