Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zaki/remove_contract-replay_local_layout #109

Merged
merged 3 commits into from
May 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ class ContractReplay extends React.Component {
}

componentWillUnmount() {
// SmartCharts keeps saving layout for ContractPlay even if layouts prop is set to null
// As a result, we have to remove it manually for each SmartChart instance in ContractReplay
localStorage.removeItem('layout-contract-replay');
this.props.hideBlur();
this.props.onUnmount();
document.removeEventListener('mousedown', this.handleClickOutside);
Expand Down
4 changes: 4 additions & 0 deletions src/javascript/app/Modules/Reports/Containers/reports.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ class Reports extends React.Component {
};

componentDidMount() {
// SmartCharts keeps saving layout for ContractPlay even if layouts prop is set to null
// As a result, we have to remove it manually for each SmartChart instance in ContractReplay
// TODO: Remove this once SmartCharts finds a way to stop ChartIQ from saving layouts to localStorage
localStorage.removeItem('layout-contract-replay');
this.props.showBlur();
document.addEventListener('mousedown', this.handleClickOutside);
this.setState({ is_visible: true });
Expand Down