]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-10255 Add possibility to clear fields in Quality Gate configuration
authorStas Vilchik <stas.vilchik@sonarsource.com>
Wed, 10 Jan 2018 15:55:17 +0000 (16:55 +0100)
committerStas Vilchik <stas.vilchik@sonarsource.com>
Fri, 12 Jan 2018 16:37:53 +0000 (17:37 +0100)
server/sonar-web/src/main/js/apps/quality-gates/components/ThresholdInput.tsx

index cf60765a6f3453925cf6ef40862bb2315ce752cd..bdaf274b7496e2665b6bce89091ea2c753fbee48 100644 (file)
@@ -33,7 +33,7 @@ export default class ThresholdInput extends React.PureComponent<Props> {
     this.props.onChange(e.currentTarget.value);
   };
 
-  handleSelectChange = (option: any) => {
+  handleSelectChange = (option: { value: string } | null) => {
     if (option) {
       this.props.onChange(option.value);
     } else {
@@ -54,6 +54,7 @@ export default class ThresholdInput extends React.PureComponent<Props> {
     return (
       <Select
         className="input-tiny text-middle"
+        clearable={true}
         name={name}
         onChange={this.handleSelectChange}
         options={options}