Skip to content

Commit

Permalink
Allow resize to occur if style or className have changed (#459)
Browse files Browse the repository at this point in the history
  • Loading branch information
mobeigi authored Oct 29, 2021
1 parent 7d20c9a commit 7be262c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/core.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,12 @@ export default class EChartsReactCore extends PureComponent<EChartsReactProps> {
return;
}

// when thoes props isEqual, do not update echarts
// when these props are not isEqual, update echarts
const pickKeys = ['option', 'notMerge', 'lazyUpdate', 'showLoading', 'loadingOption'];
if (isEqual(pick(this.props, pickKeys), pick(prevProps, pickKeys))) {
return;
if (!isEqual(pick(this.props, pickKeys), pick(prevProps, pickKeys))) {
this.updateEChartsOption();
}

this.updateEChartsOption();
/**
* when style or class name updated, change size.
*/
Expand Down

0 comments on commit 7be262c

Please sign in to comment.