sea-chart 0.0.41-beta.1 → 0.0.41-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -71,20 +71,23 @@ const Settings = _ref => {
71
71
  const closeTypesDialog = useCallback(() => {
72
72
  setDialogShow(false);
73
73
  }, []);
74
- const onTypeChange = useCallback(type => {
74
+ const onTypeChange = useCallback(newType => {
75
75
  const {
76
76
  config
77
77
  } = chart;
78
78
  const {
79
79
  type: oldType
80
80
  } = config;
81
- if (type === oldType) return;
81
+ if (newType === oldType) return;
82
82
  const convertedChart = generateChartConfig({
83
83
  ...config,
84
- type
84
+ newType
85
85
  }, tables);
86
- onChange && onChange(convertedChart);
87
- }, [chart, onChange, tables]);
86
+ onChange && onChange({
87
+ ...chart,
88
+ config: convertedChart
89
+ }, type);
90
+ }, [chart, onChange, tables, type]);
88
91
  return /*#__PURE__*/React.createElement("div", {
89
92
  className: "sea-chart-settings"
90
93
  }, /*#__PURE__*/React.createElement("div", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sea-chart",
3
- "version": "0.0.41-beta.1",
3
+ "version": "0.0.41-beta.2",
4
4
  "main": "./dist/index.js",
5
5
  "dependencies": {
6
6
  "@antv/data-set": "0.11.8",