From 4526b17b66bfc697f6099210af256cb3aa062b7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Medina=20Ballester?= Date: Tue, 23 Aug 2016 10:01:30 +0200 Subject: [PATCH] Added right scrollEventThrottle configuration (#58) --- .eslintrc | 7 +++---- lib/KeyboardAwareListView.js | 1 + lib/KeyboardAwareScrollView.js | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.eslintrc b/.eslintrc index be016c3..54d378b 100644 --- a/.eslintrc +++ b/.eslintrc @@ -10,7 +10,7 @@ "env": { "es6": true, "jasmine": true, - "node": 1, + "node": 1 }, "plugins": [ @@ -46,7 +46,7 @@ "window": false, "XMLHttpRequest": false, "pit": false, - "FormData": true, + "FormData": true }, "rules": { @@ -75,7 +75,6 @@ "use-isnan": 1, "valid-jsdoc": 0, "valid-typeof": 1, - "block-scoped-var": 0, "complexity": 0, "consistent-return": 0, @@ -166,7 +165,7 @@ "quote-props": 0, "semi": 0, "sort-vars": 0, - "keyword-spacing": 1, + "keyword-spacing": [0, { "before": true }], "space-in-brackets": 0, "space-in-parens": 0, "space-infix-ops": 1, diff --git a/lib/KeyboardAwareListView.js b/lib/KeyboardAwareListView.js index 7454e91..0ea14d5 100644 --- a/lib/KeyboardAwareListView.js +++ b/lib/KeyboardAwareListView.js @@ -32,6 +32,7 @@ const KeyboardAwareListView = React.createClass({ contentInset={{bottom: this.state.keyboardSpace}} showsVerticalScrollIndicator={true} {...this.props} + scrollEventThrottle={8} onScroll={e => { this.handleOnScroll(e) this.props.onScroll && this.props.onScroll(e) diff --git a/lib/KeyboardAwareScrollView.js b/lib/KeyboardAwareScrollView.js index cf18752..e91eaa5 100644 --- a/lib/KeyboardAwareScrollView.js +++ b/lib/KeyboardAwareScrollView.js @@ -32,6 +32,7 @@ const KeyboardAwareScrollView = React.createClass({ contentInset={{bottom: this.state.keyboardSpace}} showsVerticalScrollIndicator={true} {...this.props} + scrollEventThrottle={8} onScroll={e => { this.handleOnScroll(e) this.props.onScroll && this.props.onScroll(e)