فهرست منبع

Fix `Stepper` clearing field value on blur when no input was typed

Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
Mihaela Balutoiu 1 ماه پیش
والد
کامیت
15c3537530
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      src/components/ui/Stepper/Stepper.tsx

+ 3 - 1
src/components/ui/Stepper/Stepper.tsx

@@ -159,7 +159,9 @@ class Stepper extends React.Component<Props, State> {
   }
 
   handleInputBlur() {
-    this.commitChange(this.state.inputValue || "");
+    if (this.state.inputValue !== null) {
+      this.commitChange(this.state.inputValue);
+    }
     this.setState({ inputValue: null });
   }