]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-12208 List filter is not correct after search reset
authorphilippe-perrin-sonarsource <philippe.perrin@sonarsource.com>
Tue, 18 Jun 2019 09:29:42 +0000 (11:29 +0200)
committersonartech <sonartech@sonarsource.com>
Fri, 28 Jun 2019 06:45:45 +0000 (08:45 +0200)
server/sonar-web/src/main/js/components/SelectList/SelectList.tsx

index 34e701e57aa7d76be29b03ea3558079a56b22781..b1c7e9aa665a1d125a029bbf2f9090c9e3a7c93c 100644 (file)
@@ -75,8 +75,9 @@ export default class SelectList extends React.PureComponent<Props, State> {
   };
 
   handleQueryChange = (query: string) => {
-    this.setState({ loading: true, query });
-    this.props.onSearch(query, this.getFilter()).then(this.stopLoading, this.stopLoading);
+    this.setState({ loading: true, query }, () => {
+      this.props.onSearch(query, this.getFilter()).then(this.stopLoading, this.stopLoading);
+    });
   };
 
   getFilter = () => {