react-masked-field icon indicating copy to clipboard operation
react-masked-field copied to clipboard

Translations prop being passed to the input control as a prop causing failure

Open lankke opened this issue 7 years ago • 1 comments

Hi guys

Currently I'm getting an issue when providing my own translation object to the MaskedField component: vendor.js:24932 Warning: Unknown prop translations on <input> tag. Remove this prop from the element.

Here is my translation object: let maskTranslation = { '-': /[\-\s0-9]/ };

And here is my MaskedField call:

<MaskedField ref="DurationField" className={classString} type="text" value={durationValue} placeholder={placeholder} mask={durMask} translations={maskTranslation} onChange={this.handleChange} readOnly={this.props.readOnly} />

I suspect that the this.props.translations prop is being passed to the input control that the MaskedField creates. Can anyone replicate this issue and let me know if the problem is as I expect or should I look for another problem?

lankke avatar Mar 30 '17 07:03 lankke

I just published v1.0.1 which should fix all React warnings. Please try that version.

rylanc avatar Apr 26 '17 21:04 rylanc