fix: can not type 0.05 in TextControl (#10778)

This commit is contained in:
Shaoqing Hu
2020-09-04 03:11:34 +08:00
committed by GitHub
parent 70c6764780
commit 9bcb15091c

View File

@@ -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) {