Skip to content

Commit

Permalink
fix: can not type 0.05 in TextControl (apache#10778)
Browse files Browse the repository at this point in the history
  • Loading branch information
hushaoqing authored and villebro committed Sep 10, 2020
1 parent 7b13249 commit 153e4b1
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 153e4b1

Please sign in to comment.