Skip to content

Commit

Permalink
fix: pass all props to transformProps in LineMulti chart (apache-supe…
Browse files Browse the repository at this point in the history
  • Loading branch information
nytai committed Nov 7, 2019
1 parent e386956 commit 54aec5b
Showing 1 changed file with 6 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,12 @@ const propTypes = {
annotationData: PropTypes.object,
datasource: PropTypes.object,
formData: PropTypes.object,
onAddFilter: PropTypes.func,
onError: PropTypes.func,
};
const defaultProps = {
onAddFilter() {},
onError() {},
hooks: PropTypes.shape({
onAddFilter: PropTypes.func,
onError: PropTypes.func,
}),
};
const defaultProps = {};

function getJson(url) {
return new Promise((resolve, reject) => {
Expand Down Expand Up @@ -137,27 +136,12 @@ class LineMulti extends React.Component {
}

render() {
const {
width,
height,
annotationData,
datasource,
formData,
onAddFilter,
onError,
} = this.props;
const { queryData } = this.state;

return (
<ReactNVD3
{...transformProps({
width,
height,
annotationData,
datasource,
formData,
onError,
onAddFilter,
...this.props,
queryData,
})}
/>
Expand Down

0 comments on commit 54aec5b

Please sign in to comment.