This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 9bcb150  fix: can not type `0.05` in `TextControl` (#10778)
9bcb150 is described below

commit 9bcb15091cdda432ee6526da697b25e23367ba07
Author: Shaoqing Hu <[email protected]>
AuthorDate: Fri Sep 4 03:11:34 2020 +0800

    fix: can not type `0.05` in `TextControl` (#10778)
---
 superset-frontend/src/explore/components/controls/TextControl.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/superset-frontend/src/explore/components/controls/TextControl.tsx 
b/superset-frontend/src/explore/components/controls/TextControl.tsx
index 3d8abbd..da3550e 100644
--- a/superset-frontend/src/explore/components/controls/TextControl.tsx
+++ b/superset-frontend/src/explore/components/controls/TextControl.tsx
@@ -49,7 +49,7 @@ export default class TextControl extends 
React.Component<TextControlProps> {
       if (error) {
         errors.push(error);
       } else {
-        value = value.match(/.*(\.)$/g) ? value : parseFloat(value);
+        value = value.match(/.*(\.|0)$/g) ? value : parseFloat(value);
       }
     }
     if (value !== '' && this.props.isInt) {

Reply via email to