Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove event listeners for Location on unmount
Currently, if the component is not mounted (e.g. because on a different page), the component will still receive the change event and the `onLocationChange` callback changes its props via `this.props.setProps` with the itempath from ('_dashprivate_path') in the DOM. The object, however, is not on the dom and a random other DOM element is assigned the changed props. The PR deregisters the event listeners of the component is unmounted. They will be added again via `componentDidMount` anyways if the component is mounted again. fixes plotly#1346
- Loading branch information