Skip to content

Commit

Permalink
[ML] Fixing the unmounting jobs list react component on page change (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jgowdyelastic authored Feb 5, 2019
1 parent 389290e commit 08a8f87
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions x-pack/plugins/ml/public/jobs/jobs_list/directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ module.directive('jobsPage', function () {
</I18nContext>,
element[0]
);

element.on('$destroy', () => {
ReactDOM.unmountComponentAtNode(element[0]);
scope.$destroy();
});
}
};
});

0 comments on commit 08a8f87

Please sign in to comment.