Skip to content

Commit 19b294d

Browse files
committed
Remove charteditor from default chartPackages and update docs accordingly. #234
1 parent 2a2cbae commit 19b294d

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-google-charts",
3-
"version": "3.0.4",
3+
"version": "3.0.5",
44
"type": "react-component",
55
"description": "react-google-charts React component",
66
"main": "dist/index.cjs.js",

src/components/GoogleChartLoader.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ export class GoogleChartLoader extends React.Component<Props> {
2424
onLoad
2525
} = this.props;
2626
windowGoogleCharts.charts.load(version || "current", {
27-
packages: packages || ["corechart", "controls", "charteditor"],
27+
packages: packages || ["corechart", "controls"],
2828
language: language || "en",
2929
mapsApiKey
3030
});
3131
windowGoogleCharts.charts.setOnLoadCallback(() => {
3232
onLoad(windowGoogleCharts);
3333
});
3434
};
35-
shouldComponentUpdate() {
36-
return false;
35+
shouldComponentUpdate(nextProps: Props) {
36+
return nextProps.chartPackages === this.props.chartPackages;
3737
}
3838
render() {
3939
const { onError } = this.props;

src/docs/ChartEditor.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ import Chart from '../index'
5454
component.setState({chartEditor, chartWrapper, google})
5555
console.log("Get Chart Editor")
5656
}}
57+
chartPackages={["corechart", "controls", "charteditor"]}
5758
/>
5859
</div>
5960
}

src/docs/index.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ import {Playground} from 'docz'
1212
React Google Charts offers a declarative API to make rendering charts fun and easy.
1313

1414

15-
16-
1715
## Install
1816

1917
```sh

0 commit comments

Comments
 (0)