fix(swipe): Cache isEnabled: false, fix scrolling in Trash

This commit is contained in:
Ben Gotow 2016-04-13 13:41:37 -07:00
parent b64719d09f
commit 471bbbe1e3

View file

@ -114,7 +114,7 @@ export default class SwipeContainer extends Component {
}
_isEnabled = ()=> {
if (!this.isEnabled) {
if (this.isEnabled === null) {
// Cache this value so we don't have to recalculate on every swipe
this.isEnabled = (
(this.props.onSwipeLeft || this.props.onSwipeRight) &&