Skip to content

Commit

Permalink
fix: can not type 0.05 in TextControl (#10778)
Browse files Browse the repository at this point in the history
  • Loading branch information
hushaoqing authored Sep 3, 2020
1 parent 70c6764 commit 9bcb150
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 9bcb150

Please sign in to comment.