Skip to content

Commit

Permalink
Fix: remove selection in Redux too (PR feedback from Joe)
Browse files Browse the repository at this point in the history
  • Loading branch information
monfera committed Mar 5, 2019
1 parent 272faae commit 6ba1b3d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion x-pack/plugins/canvas/public/state/middleware/aeroelastic.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,11 @@ export const aeroelastic = ({ dispatch, getState }) => {
}

if (pageChangerActions.indexOf(action.type) >= 0) {
unselectShape(prevPage);
if (getSelectedElement(getState())) {
dispatch(selectElement(null)); // ensure sidebar etc. get updated; will update the layout engine too
} else {
unselectShape(prevPage); // deselect persistent groups as they're not currently selections in Redux
}
}

next(action);
Expand Down

0 comments on commit 6ba1b3d

Please sign in to comment.