Skip to content

Commit

Permalink
version 1.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
sanniassin committed Feb 9, 2018
1 parent 5daa416 commit 6b4f4c5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
16 changes: 13 additions & 3 deletions dist/react-input-mask.js
Original file line number Diff line number Diff line change
Expand Up @@ -512,9 +512,7 @@ function (_React$Component) {
}

return React.createElement("input", _extends({
ref: function ref(_ref) {
return _this2.input = _ref;
}
ref: this.handleRef
}, props, {
onFocus: this.onFocus,
onBlur: this.onBlur
Expand Down Expand Up @@ -1055,6 +1053,18 @@ var _initialiseProps = function _initialiseProps() {
_this3.setCursorPos(cursorPos);
}
});
Object.defineProperty(this, "handleRef", {
configurable: true,
enumerable: true,
writable: true,
value: function value(ref) {
_this3.input = ref;

if (typeof _this3.props.inputRef === 'function') {
_this3.props.inputRef(ref);
}
}
});
};

return InputElement;
Expand Down
Loading

0 comments on commit 6b4f4c5

Please sign in to comment.