Skip to content
This repository has been archived by the owner on Jun 25, 2020. It is now read-only.

fix: pass all props to transformProps in LineMulti chart #247

Merged
merged 1 commit into from
Nov 7, 2019
Merged
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,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