@@ -225,7 +225,8 @@ class InputSpinner extends Component {
225225 } else {
226226 value = String ( this . parseNum ( value ) ) ;
227227 }
228- return value . replace (
228+ let hasPlaceholder = value === "0" && ! this . isStringEmpty ( this . props . placeholder ) ;
229+ return hasPlaceholder ? "" : value . replace (
229230 "." ,
230231 ! this . isStringEmpty ( this . props . decimalSeparator )
231232 ? this . props . decimalSeparator
@@ -811,6 +812,8 @@ class InputSpinner extends Component {
811812 ref = { ( input ) => ( this . textInput = input ) }
812813 style = { this . _getInputTextStyle ( ) }
813814 value = { this . getValue ( ) }
815+ placeholder = { this . props . placeholder }
816+ placeholderTextColor = { this . props . placeholderTextColor }
814817 selectionColor = { this . props . selectionColor }
815818 selectTextOnFocus = { this . props . selectTextOnFocus }
816819 returnKeyType = { this . props . returnKeyType }
@@ -865,6 +868,8 @@ InputSpinner.propTypes = {
865868 editable : PropTypes . bool ,
866869 autofocus : PropTypes . bool ,
867870 selectTextOnFocus : PropTypes . bool ,
871+ placeholder : PropTypes . string ,
872+ placeholderTextColor : PropTypes . string ,
868873 selectionColor : PropTypes . string ,
869874 returnKeyLabel : PropTypes . string ,
870875 returnKeyType : PropTypes . string ,
0 commit comments