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 ddd5dc3 commit f351efa
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 @@ -49,6 +49,11 @@ module.directive('jobsPage', function () {
</I18nContext>,
element[0]
);

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

0 comments on commit f351efa

Please sign in to comment.