Comparing version 2.0.8 to 2.0.9
@@ -7,2 +7,6 @@ # Change Log | ||
## 2.0.9 - 2016-10-21 | ||
- [DatePicker, ActionArea] Avoid firing the ActionArea's onUpdate twice on touch devices e.g. next month button & previous month button. | ||
## 2.0.8 - 2016-10-17 | ||
@@ -9,0 +13,0 @@ |
@@ -43,2 +43,3 @@ 'use strict'; | ||
onUpdate: _react.PropTypes.func, | ||
onClick: _react.PropTypes.func, | ||
style: _react.PropTypes.object | ||
@@ -119,3 +120,2 @@ }; | ||
_this._onMouseUp = function (event) { | ||
var isActive = _this.state.isActive; | ||
if (event.button === 0) { | ||
@@ -130,6 +130,2 @@ _this.setState({ | ||
} | ||
if (event.button === 0 && isActive && _this.props.onUpdate) { | ||
_this.props.onUpdate({}); | ||
} | ||
}; | ||
@@ -151,4 +147,2 @@ | ||
_this._onTouchEnd = function () { | ||
var isActive = _this.state.isActive; | ||
_this.setState({ | ||
@@ -162,6 +156,2 @@ isActive: false, | ||
} | ||
if (isActive && _this.props.onUpdate) { | ||
_this.props.onUpdate({}); | ||
} | ||
}; | ||
@@ -180,2 +170,12 @@ | ||
_this._onClick = function (event) { | ||
if (_this.props.onClick) { | ||
_this.props.onClick(event); | ||
} | ||
if (_this.props.onUpdate) { | ||
_this.props.onUpdate({}); | ||
} | ||
}; | ||
_this.childProps = sanitizeChildProps(properties); | ||
@@ -262,2 +262,3 @@ return _this; | ||
onTouchCancel: this._onTouchCancel, | ||
onClick: this._onClick, | ||
style: style | ||
@@ -264,0 +265,0 @@ }), |
{ | ||
"name": "belle", | ||
"version": "2.0.8", | ||
"version": "2.0.9", | ||
"description": "Configurable React Components with great UX", | ||
@@ -5,0 +5,0 @@ "author": { |
643474
15398