Skip to content

Commit

Permalink
fix: update lineMulti when queryData changes (apache#782)
Browse files Browse the repository at this point in the history
  • Loading branch information
nytai authored and zhaoyongjie committed Nov 24, 2021
1 parent ea22515 commit ca2c372
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,12 @@ class LineMulti extends React.Component {
this.loadData(this.props);
}

shouldComponentUpdate(nextProps) {
shouldComponentUpdate(nextProps, nextState) {
const { rawFormData } = this.props;
const { rawFormData: nextRawFormData } = nextProps;
const { queryData } = this.state;
if (!queryData || !isEqual(rawFormData, nextRawFormData)) {
const { queryData: nextQueryData } = nextState;
if (!isEqual(queryData, nextQueryData) || !isEqual(rawFormData, nextRawFormData)) {
return true;
}

Expand Down

0 comments on commit ca2c372

Please sign in to comment.