Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React 15 Warning: Unknown prop placeholderChar on <input> tag. #61

Closed
dbrans opened this issue Jul 15, 2016 · 5 comments
Closed

React 15 Warning: Unknown prop placeholderChar on <input> tag. #61

dbrans opened this issue Jul 15, 2016 · 5 comments

Comments

@dbrans
Copy link

dbrans commented Jul 15, 2016

Remove this prop from the element. For details, see https://fb.me/react-unknown-prop.

@basham
Copy link

basham commented Jul 20, 2016

#59 provided this fix, and it was released as v3.2.1. However, the compiled npm build of v3.2.1 in ./lib/index.js didn't pick up the change. It looks like:

  render: function render() {
    var _this = this;

    var _props = this.props;
    var mask = _props.mask;
    var formatCharacters = _props.formatCharacters;
    var size = _props.size;
    var placeholder = _props.placeholder;

    var props = _objectWithoutProperties(_props, ['mask', 'formatCharacters', 'size', 'placeholder']);

    var patternLength = this.mask.pattern.length;
    return React.createElement('input', _extends({}, props, {
      ref: function (r) {
        return _this.input = r;
      },
      maxLength: patternLength,
      onChange: this._onChange,
      onKeyDown: this._onKeyDown,
      onKeyPress: this._onKeyPress,
      onPaste: this._onPaste,
      placeholder: placeholder || this.mask.emptyValue,
      size: size || patternLength,
      value: this._getDisplayValue()
    }));
  }

@dbrans
Copy link
Author

dbrans commented Jul 20, 2016

+1

@iamdustan
Copy link
Collaborator

rebuilt and republished. Apologies.

@bjornd
Copy link

bjornd commented Dec 9, 2016

It reproduces again in 3.3.2

@leordev
Copy link

leordev commented Feb 7, 2017

I'm having this on 3.3.3, should I update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants