From 193e5643866c0e962f929ccb0b18b9c4de471009 Mon Sep 17 00:00:00 2001 From: Tai Dupree Date: Tue, 5 Nov 2019 15:04:18 -0800 Subject: [PATCH] fix: pass all props to transformProps in LineMulti chart --- .../src/LineMulti/LineMulti.jsx | 28 ++++--------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/packages/superset-ui-legacy-preset-chart-nvd3/src/LineMulti/LineMulti.jsx b/packages/superset-ui-legacy-preset-chart-nvd3/src/LineMulti/LineMulti.jsx index 6f76070fe..c6d0862d3 100644 --- a/packages/superset-ui-legacy-preset-chart-nvd3/src/LineMulti/LineMulti.jsx +++ b/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 (