From e22c6cf16d34263cdc087a2dc3cc27efece0691d Mon Sep 17 00:00:00 2001 From: "Vitaly D. Kravtsov" Date: Tue, 18 Apr 2017 12:11:55 +0300 Subject: [PATCH] fix handlers bindings --- src/index.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/index.js b/src/index.js index ad149ea..cb5d00d 100644 --- a/src/index.js +++ b/src/index.js @@ -59,6 +59,15 @@ function setSelection(el, selection) { } class MaskedInput extends React.Component { + constructor(props) { + super(props) + + this._onChange = this._onChange.bind(this) + this._onKeyDown = this._onKeyDown.bind(this) + this._onPaste = this._onPaste.bind(this) + this._onKeyPress = this._onKeyPress.bind(this) + } + componentWillMount() { var options = { pattern: this.props.mask,