Skip to content

Commit 96fcb41

Browse files
authored
Merge pull request facebook#392 from jhen0409/patch-1
Fix number type input for React Native style editor
2 parents 53538d1 + 77baa60 commit 96fcb41

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

plugins/ReactNativeStyle/StyleEdit.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ class StyleEdit extends React.Component {
5555
:
5656
<BlurInput
5757
value={this.props.style[name]}
58-
onChange={val => this.props.onChange(name, val)}
58+
onChange={val => {
59+
var num = Number(val);
60+
this.props.onChange(name, num == val ? num : val);
61+
}}
5962
/>
6063
</li>
6164
))}

0 commit comments

Comments
 (0)