{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/1255","labels_url":"https://api.github.com/repos/facebook/react-native/issues/1255/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/1255/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/1255/events","html_url":"https://github.com/facebook/react-native/pull/1255","id":75775310,"number":1255,"title":"[Touchable] Add custom delay props to Touchable components","user":{"login":"jmstout","id":817658,"avatar_url":"https://avatars.githubusercontent.com/u/817658?v=3","gravatar_id":"","url":"https://api.github.com/users/jmstout","html_url":"https://github.com/jmstout","followers_url":"https://api.github.com/users/jmstout/followers","following_url":"https://api.github.com/users/jmstout/following{/other_user}","gists_url":"https://api.github.com/users/jmstout/gists{/gist_id}","starred_url":"https://api.github.com/users/jmstout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmstout/subscriptions","organizations_url":"https://api.github.com/users/jmstout/orgs","repos_url":"https://api.github.com/users/jmstout/repos","events_url":"https://api.github.com/users/jmstout/events{/privacy}","received_events_url":"https://api.github.com/users/jmstout/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/react-native/labels/CLA%20Signed","name":"CLA Signed","color":"e7e7e7"},{"url":"https://api.github.com/repos/facebook/react-native/labels/GH%20Review:%20accepted","name":"GH Review: accepted","color":"009800"}],"state":"open","locked":false,"assignee":{"login":"sahrens","id":1509831,"avatar_url":"https://avatars.githubusercontent.com/u/1509831?v=3","gravatar_id":"","url":"https://api.github.com/users/sahrens","html_url":"https://github.com/sahrens","followers_url":"https://api.github.com/users/sahrens/followers","following_url":"https://api.github.com/users/sahrens/following{/other_user}","gists_url":"https://api.github.com/users/sahrens/gists{/gist_id}","starred_url":"https://api.github.com/users/sahrens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sahrens/subscriptions","organizations_url":"https://api.github.com/users/sahrens/orgs","repos_url":"https://api.github.com/users/sahrens/repos","events_url":"https://api.github.com/users/sahrens/events{/privacy}","received_events_url":"https://api.github.com/users/sahrens/received_events","type":"User","site_admin":false},"milestone":null,"comments":26,"created_at":"2015-05-12T23:19:54Z","updated_at":"2015-06-03T16:57:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/facebook/react-native/pulls/1255","html_url":"https://github.com/facebook/react-native/pull/1255","diff_url":"https://github.com/facebook/react-native/pull/1255.diff","patch_url":"https://github.com/facebook/react-native/pull/1255.patch"},"body":"This PR adds quite a bit of functionality to the Touchable components, allowing the ms delays of each of the handlers (`onPressIn, onPressOut, onPress, onLongPress`) to be configured.\r\n\r\nIt adds the following props to `TouchableWithoutFeedback, TouchableOpacity, and TouchableHighlight`:\r\n```javascript\r\n/**\r\n * Delay in ms, from the release of the touch, before onPress is called.\r\n */\r\ndelayOnPress: React.PropTypes.number,\r\n/**\r\n * Delay in ms, from the start of the touch, before onPressIn is called.\r\n */\r\ndelayOnPressIn: React.PropTypes.number,\r\n/**\r\n * Delay in ms, from the release of the touch, before onPressOut is called.\r\n */\r\ndelayOnPressOut: React.PropTypes.number,\r\n/**\r\n * Delay in ms, from onPressIn, before onLongPress is called.\r\n */\r\ndelayOnLongPress: React.PropTypes.number,\r\n```\r\n\r\n\r\n`TouchableHighlight` also gets an additional set of props:\r\n```javascript\r\n/**\r\n * Delay in ms, from the start of the touch, before the highlight is shown.\r\n */\r\ndelayHighlightShow: React.PropTypes.number,\r\n/**\r\n * Delay in ms, from the start of the highlight, before it is hidden.\r\n */\r\ndelayHighlightHide: React.PropTypes.number,\r\n```\r\n\r\nUsing these decouples the component's highlight from the press events, which could be useful in certain scenarios.\r\n\r\nI had to add a bit of complexity to the components, especially `TouchableHighlight`, but I think the benefit of having this customizability is definitely there.\r\n\r\nLet me know what you think. I'm happy to make changes as you all see fit.\r\n\r\nResolves #1078 and #134."},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/108523316","html_url":"https://github.com/facebook/react-native/pull/1255#issuecomment-108523316","issue_url":"https://api.github.com/repos/facebook/react-native/issues/1255","id":108523316,"user":{"login":"brentvatne","id":90494,"avatar_url":"https://avatars.githubusercontent.com/u/90494?v=3","gravatar_id":"","url":"https://api.github.com/users/brentvatne","html_url":"https://github.com/brentvatne","followers_url":"https://api.github.com/users/brentvatne/followers","following_url":"https://api.github.com/users/brentvatne/following{/other_user}","gists_url":"https://api.github.com/users/brentvatne/gists{/gist_id}","starred_url":"https://api.github.com/users/brentvatne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brentvatne/subscriptions","organizations_url":"https://api.github.com/users/brentvatne/orgs","repos_url":"https://api.github.com/users/brentvatne/repos","events_url":"https://api.github.com/users/brentvatne/events{/privacy}","received_events_url":"https://api.github.com/users/brentvatne/received_events","type":"User","site_admin":false},"created_at":"2015-06-03T16:57:31Z","updated_at":"2015-06-03T16:57:31Z","body":"@jmstout - thanks for sticking with this :+1: :rocket: :cake:"}}