sea-chart 1.1.2-alpha.2 → 1.1.3

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.
Files changed (2) hide show
  1. package/dist/view/index.js +3 -21
  2. package/package.json +1 -1
@@ -112,37 +112,19 @@ class View extends React.PureComponent {
112
112
  }
113
113
  componentDidMount() {
114
114
  this.unsubscribeReFreshChart = eventBus.subscribe(CommonEventTypes.REFRESH_CHARTS, this.refreshChart);
115
- const {
116
- hasUnSaved
117
- } = this.props;
118
- if (!hasUnSaved) {
119
- this.calculateStatistic();
120
- }
115
+ this.calculateStatistic();
121
116
  }
122
117
  componentWillUnmount() {
123
118
  this.unsubscribeReFreshChart();
124
119
  }
125
120
  UNSAFE_componentWillReceiveProps(nextProps) {
126
121
  const {
127
- chart: oldChart,
128
- hasUnSaved
122
+ chart: oldChart
129
123
  } = this.props;
130
124
  const {
131
- chart,
132
- hasUnSaved: nextUnSaved
125
+ chart
133
126
  } = nextProps;
134
- const {
135
- data
136
- } = this.state;
137
127
  context.api = this.props.api;
138
-
139
- // universal-apps will not trigger calculation of the chart before the chart config saved
140
- // after saved, hasUnSaved was set to false, then trigger calculation
141
- const needCalc = hasUnSaved === true && nextUnSaved === false;
142
- if (needCalc && !data) {
143
- this.calculateStatistic();
144
- return;
145
- }
146
128
  if (shallowEqual(chart, oldChart)) return;
147
129
  this.setState({
148
130
  isCalculated: false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sea-chart",
3
- "version": "1.1.2-alpha.2",
3
+ "version": "1.1.3",
4
4
  "main": "./dist/index.js",
5
5
  "dependencies": {
6
6
  "@antv/data-set": "0.11.8",