From 54aec5b397591d319dcf6c52892c2ea0403d526a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CA=88=E1=B5=83=E1=B5=A2?= Date: Thu, 7 Nov 2019 10:04:01 -0800 Subject: [PATCH] fix: pass all props to transformProps in LineMulti chart (#247) --- .../src/LineMulti/LineMulti.jsx | 28 ++++--------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/plugins/superset-ui-plugins/packages/superset-ui-legacy-preset-chart-nvd3/src/LineMulti/LineMulti.jsx b/plugins/superset-ui-plugins/packages/superset-ui-legacy-preset-chart-nvd3/src/LineMulti/LineMulti.jsx index 6f76070fe7..c6d0862d35 100644 --- a/plugins/superset-ui-plugins/packages/superset-ui-legacy-preset-chart-nvd3/src/LineMulti/LineMulti.jsx +++ b/plugins/superset-ui-plugins/packages/superset-ui-legacy-preset-chart-nvd3/src/LineMulti/LineMulti.jsx @@ -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) => { @@ -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 (