Skip to content

Commit

Permalink
Clear editor state on visualize listing page load
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomThomson committed Dec 11, 2020
1 parent 67217c9 commit 24d7189
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export const VisualizeListing = () => {
savedVisualizations,
toastNotifications,
visualizations,
embeddable,
savedObjects,
savedObjectsPublic,
savedObjectsTagging,
Expand Down Expand Up @@ -72,6 +73,8 @@ export const VisualizeListing = () => {
}, [history, pathname, visualizations]);

useMount(() => {
// Reset editor state if the visualize listing page is loaded.
embeddable.getStateTransfer().clearEditorState();
chrome.setBreadcrumbs([
{
text: i18n.translate('visualize.visualizeListingBreadcrumbsTitle', {
Expand Down

0 comments on commit 24d7189

Please sign in to comment.