Skip to content
Snippets Groups Projects
Unverified Commit 51faf90a authored by metabase-bot[bot]'s avatar metabase-bot[bot] Committed by GitHub
Browse files

focus the top card in newly created section (#39961) (#40019)

parent fa4f7eef
Branches
Tags
No related merge requests found
......@@ -239,10 +239,10 @@ const dashcards = handleActions(
[dashcard.id]: { ...dashcard, isAdded: true, justAdded: true },
}),
[ADD_MANY_CARDS_TO_DASH]: (state, { payload: dashcards }) => {
const storeDashcards = dashcards.map(dc => ({
const storeDashcards = dashcards.map((dc, index) => ({
...dc,
isAdded: true,
justAdded: true,
justAdded: index === 0,
}));
const storeDashCardsMap = _.indexBy(storeDashcards, "id");
return {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment