浏览代码

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 年之前
父节点
当前提交
b0feadd8e6
共有 1 个文件被更改,包括 1 次插入1 次删除
  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);
             }
         }