Skip to content

Commit

Permalink
Remove onAppLeave in useEffectCleanup to prevent confirm when leaving…
Browse files Browse the repository at this point in the history
… from listing page (elastic#89041) (elastic#89213)
  • Loading branch information
ThomThomson authored Jan 25, 2021
1 parent 4ff58d7 commit 8e22f8e
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ const TopNav = ({
}
return actions.default();
});
return () => {
// reset on app leave handler so leaving from the listing page doesn't trigger a confirmation
onAppLeave((actions) => actions.default());
};
}, [
onAppLeave,
hasUnappliedChanges,
Expand Down

0 comments on commit 8e22f8e

Please sign in to comment.