aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src
diff options
context:
space:
mode:
authorMathieu Suen <mathieu.suen@sonarsource.com>2022-04-25 10:53:20 +0200
committersonartech <sonartech@sonarsource.com>2022-04-25 20:02:45 +0000
commit9978345d0dbb058fc3c059702f374a3892542e01 (patch)
tree1061d80bd67a6ff93c38a29f7c831f4cf98d2c95 /server/sonar-web/src
parent64f91092e3303593f6bed7f24a02a20c36a2b5f7 (diff)
downloadsonarqube-9978345d0dbb058fc3c059702f374a3892542e01.tar.gz
sonarqube-9978345d0dbb058fc3c059702f374a3892542e01.zip
SONAR-16299 Replace React legacy lifecycle methods in GraphsHistory
Diffstat (limited to 'server/sonar-web/src')
-rw-r--r--server/sonar-web/src/main/js/components/activity-graph/GraphsHistory.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/sonar-web/src/main/js/components/activity-graph/GraphsHistory.tsx b/server/sonar-web/src/main/js/components/activity-graph/GraphsHistory.tsx
index 46713bed9f5..a644e8e3a35 100644
--- a/server/sonar-web/src/main/js/components/activity-graph/GraphsHistory.tsx
+++ b/server/sonar-web/src/main/js/components/activity-graph/GraphsHistory.tsx
@@ -56,9 +56,9 @@ export default class GraphsHistory extends React.PureComponent<Props, State> {
};
}
- componentWillReceiveProps(nextProps: Props) {
- if (!isEqual(nextProps.selectedDate, this.props.selectedDate)) {
- this.setState({ selectedDate: nextProps.selectedDate });
+ componentDidUpdate(prevProps: Props) {
+ if (!isEqual(prevProps.selectedDate, this.props.selectedDate)) {
+ this.setState({ selectedDate: this.props.selectedDate });
}
}