Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add onPurge callback #29

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

Merged
bpostlethwaite merged 4 commits into master from addOnUnmountHook
Dec 30, 2017
Merged

Add onPurge callback #29

bpostlethwaite merged 4 commits into master from addOnUnmountHook
Dec 30, 2017

Conversation

Copy link
Member

@bpostlethwaite bpostlethwaite commented Dec 30, 2017

This adds an onPurge callback to the component. Currently this component calls plotly.purge(gd) when unmounting which strips the graphDiv of data, layout, _fullData and _fullLayout. This hook allows applications to take corrective action like transferring these objects to a new object.

import React, {Component} from 'react';
import PropTypes from 'prop-types';
import isNumeric from 'fast-isnumeric';
import objectAssign from 'object-assign';
// import throttle from "throttle-debounce/throttle";

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we delete this commented out import

Copy link
Member Author

@bpostlethwaite bpostlethwaite Dec 30, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed though I'll let the future maintainer do it. Maybe they'll want to create a throttling issue or something.

Copy link
Contributor

VeraZab commented Dec 30, 2017

yup, looks good 💃

@bpostlethwaite bpostlethwaite deleted the addOnUnmountHook branch December 30, 2017 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
1 more reviewer

@VeraZab VeraZab VeraZab approved these changes

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /