Przeglądaj źródła

fix: reset form not clear `Form.InputNumber` error message (#1118)

* fix: No 'default' in AvatarGroupSize TS value

* fix: `Form.InputNumber` reset not clear error msg

Co-authored-by: pointhalo <[email protected]>
Anoyi 3 lat temu
rodzic
commit
b0feadd8e6
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      packages/semi-ui/inputNumber/index.tsx

+ 1 - 1
packages/semi-ui/inputNumber/index.tsx

@@ -329,7 +329,7 @@ class InputNumber extends BaseComponent<InputNumberProps, InputNumberState> {
                     this.foundation.updateStates({ number: null, value: newValue });
                 }
             }
-            if (isString(newValue) && newValue !== String(this.props.value)) {
+            if (newValue && isString(newValue) && newValue !== String(this.props.value)) {
                 this.foundation.notifyChange(newValue, null);
             }
         }