File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ EditableText.propTypes = {
104104 text : PropTypes . any ,
105105
106106 // Input properties
107- placeholder : PropTypes . string ,
107+ placeholder : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . number ] ) ,
108108 className : PropTypes . string ,
109109 disable : PropTypes . bool ,
110110 autoFocus : PropTypes . bool ,
Original file line number Diff line number Diff line change @@ -86,9 +86,9 @@ export default class NumericInput extends Component {
8686 let valueUpdate ;
8787 if ( isNumeric ( value ) ) {
8888 if ( direction === 'increase' ) {
89- valueUpdate = value + step ;
89+ valueUpdate = parseFloat ( value ) + step ;
9090 } else {
91- valueUpdate = value - step ;
91+ valueUpdate = parseFloat ( value ) - step ;
9292 }
9393 } else {
9494 // if we are multi-valued and the user is incrementing or decrementing
@@ -138,7 +138,7 @@ export default class NumericInput extends Component {
138138 min = { this . props . min }
139139 max = { this . props . max }
140140 step = { this . props . step }
141- value = { this . state . value }
141+ value = { parseFloat ( this . state . value ) }
142142 onChange = { this . updateValue }
143143 tooltip = { false }
144144 />
@@ -172,7 +172,7 @@ NumericInput.propTypes = {
172172 max : PropTypes . number ,
173173 min : PropTypes . number ,
174174 onUpdate : PropTypes . func . isRequired ,
175- placeholder : PropTypes . string ,
175+ placeholder : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . number ] ) ,
176176 showArrows : PropTypes . bool ,
177177 showSlider : PropTypes . bool ,
178178 step : PropTypes . number ,
You can’t perform that action at this time.
0 commit comments