{"action":"created","comment":{"url":"https://api.github.com/repos/infinitered/ignite/pulls/comments/87213648","pull_request_review_id":7833983,"id":87213648,"diff_hunk":"@@ -0,0 +1,95 @@\n+// @flow\n+\n+import React from 'react'\n+import { View, Text, ListView } from 'react-native'\n+import { connect } from 'react-redux'\n+// For empty lists\n+import AlertMessage from '../Components/AlertMessage'\n+// Styles\n+import styles from './Styles/ListviewExampleStyle'\n+\n+class ListviewExample extends React.Component {\n+  state: {\n+    dataSource: Object\n+  }\n+\n+  constructor (props) {\n+    super(props)\n+    /* ***********************************************************\n+    * Teach datasource how to detect if rows are different\n+    * Make this function fast!  Perhaps something like:\n+    *   (r1, r2) => r1.id !== r2.id}\n+    *************************************************************/\n+    const rowHasChanged = (r1, r2) => r1 !== r2\n+\n+    // DataSource configured\n+    const ds = new ListView.DataSource({rowHasChanged})\n+\n+    // Datasource is always in state\n+    this.state = {\n+      dataSource: ds.cloneWithRows(props.results)\n+    }\n+  }\n+\n+  /* ***********************************************************\n+  * `_renderRow` function -How each cell/row should be rendered\n+  * It's our best practice to place a single component here:\n+  *\n+  * e.g.\n+    return <MyCustomCell title={rowData.title} description={rowData.description} />\n+  *************************************************************/\n+  _renderRow (searchTerm) {\n+    return (\n+      <View style={styles.row}>\n+        <Text style={styles.boldLabel}>{searchTerm}</Text>\n+      </View>\n+    )\n+  }\n+\n+  /* ***********************************************************\n+  * If your datasource is driven by Redux, you'll need to\n+  * reset it when new data arrives.\n+  * DO NOT! place `cloneWithRows` inside of render, since render\n+  * is called very often, and should remain fast!  Just replace\n+  * state's datasource on newProps.\n+  *\n+  * e.g.\n+  *************************************************************/\n+  componentWillReceiveProps (newProps) {\n+    if (newProps.results) {\n+      this.setState({\n+        dataSource: this.state.dataSource.cloneWithRows(newProps.results)\n+      })\n+    }\n+  }\n+\n+  // Used for friendly AlertMessage\n+  // returns true if the dataSource is empty\n+  _noRowData () {","path":"ignite-base/App/Containers/ListviewSearchingExample.js","position":68,"original_position":68,"commit_id":"71f15f70d65bb3b9aec01474a346a5fb685d3d15","original_commit_id":"71f15f70d65bb3b9aec01474a346a5fb685d3d15","user":{"login":"GantMan","id":997157,"avatar_url":"https://avatars.githubusercontent.com/u/997157?v=3","gravatar_id":"","url":"https://api.github.com/users/GantMan","html_url":"https://github.com/GantMan","followers_url":"https://api.github.com/users/GantMan/followers","following_url":"https://api.github.com/users/GantMan/following{/other_user}","gists_url":"https://api.github.com/users/GantMan/gists{/gist_id}","starred_url":"https://api.github.com/users/GantMan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GantMan/subscriptions","organizations_url":"https://api.github.com/users/GantMan/orgs","repos_url":"https://api.github.com/users/GantMan/repos","events_url":"https://api.github.com/users/GantMan/events{/privacy}","received_events_url":"https://api.github.com/users/GantMan/received_events","type":"User","site_admin":false},"body":"how should we indicate private methods?  If you have a better way, I'm in.","created_at":"2016-11-09T15:29:23Z","updated_at":"2016-11-09T15:29:23Z","html_url":"https://github.com/infinitered/ignite/pull/486#discussion_r87213648","pull_request_url":"https://api.github.com/repos/infinitered/ignite/pulls/486","_links":{"self":{"href":"https://api.github.com/repos/infinitered/ignite/pulls/comments/87213648"},"html":{"href":"https://github.com/infinitered/ignite/pull/486#discussion_r87213648"},"pull_request":{"href":"https://api.github.com/repos/infinitered/ignite/pulls/486"}}},"pull_request":{"url":"https://api.github.com/repos/infinitered/ignite/pulls/486","id":92846426,"html_url":"https://github.com/infinitered/ignite/pull/486","diff_url":"https://github.com/infinitered/ignite/pull/486.diff","patch_url":"https://github.com/infinitered/ignite/pull/486.patch","issue_url":"https://api.github.com/repos/infinitered/ignite/issues/486","number":486,"state":"closed","locked":false,"title":"Add Search Bar to CustomNavBar","user":{"login":"fvonhoven","id":10098988,"avatar_url":"https://avatars.githubusercontent.com/u/10098988?v=3","gravatar_id":"","url":"https://api.github.com/users/fvonhoven","html_url":"https://github.com/fvonhoven","followers_url":"https://api.github.com/users/fvonhoven/followers","following_url":"https://api.github.com/users/fvonhoven/following{/other_user}","gists_url":"https://api.github.com/users/fvonhoven/gists{/gist_id}","starred_url":"https://api.github.com/users/fvonhoven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fvonhoven/subscriptions","organizations_url":"https://api.github.com/users/fvonhoven/orgs","repos_url":"https://api.github.com/users/fvonhoven/repos","events_url":"https://api.github.com/users/fvonhoven/events{/privacy}","received_events_url":"https://api.github.com/users/fvonhoven/received_events","type":"User","site_admin":false},"body":"Adds a Search Bar & more functionality to the`CustomNavBar` as well as a way to search a ListView\r\n(Also a few refactors & cleanups)\r\n## Please verify the following:\r\n- [X] Everything works on iOS/Android\r\n- [X] `ignite-base` **ava** tests pass\r\n- [X] `fireDrill.sh` passed\r\n\r\n## Describe your PR\r\n#### iOS\r\n![ignite - search](https://cloud.githubusercontent.com/assets/10098988/20114426/ee8404e6-a5b9-11e6-8953-f32908966c9f.gif)\r\n\r\n#### Android\r\n![ignite - search-android](https://cloud.githubusercontent.com/assets/10098988/20114439/f63bc192-a5b9-11e6-9e5a-01e02dea6809.gif)\r\n\r\n\r\n\r\n","created_at":"2016-11-08T19:49:10Z","updated_at":"2016-11-09T15:29:23Z","closed_at":"2016-11-09T15:29:19Z","merged_at":"2016-11-09T15:29:19Z","merge_commit_sha":"3cac0a42dd61cbeb84de7f9653c818f5f7d9363b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/infinitered/ignite/pulls/486/commits","review_comments_url":"https://api.github.com/repos/infinitered/ignite/pulls/486/comments","review_comment_url":"https://api.github.com/repos/infinitered/ignite/pulls/comments{/number}","comments_url":"https://api.github.com/repos/infinitered/ignite/issues/486/comments","statuses_url":"https://api.github.com/repos/infinitered/ignite/statuses/71f15f70d65bb3b9aec01474a346a5fb685d3d15","head":{"label":"infinitered:add/search-bar","ref":"add/search-bar","sha":"71f15f70d65bb3b9aec01474a346a5fb685d3d15","user":{"login":"infinitered","id":3902527,"avatar_url":"https://avatars.githubusercontent.com/u/3902527?v=3","gravatar_id":"","url":"https://api.github.com/users/infinitered","html_url":"https://github.com/infinitered","followers_url":"https://api.github.com/users/infinitered/followers","following_url":"https://api.github.com/users/infinitered/following{/other_user}","gists_url":"https://api.github.com/users/infinitered/gists{/gist_id}","starred_url":"https://api.github.com/users/infinitered/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/infinitered/subscriptions","organizations_url":"https://api.github.com/users/infinitered/orgs","repos_url":"https://api.github.com/users/infinitered/repos","events_url":"https://api.github.com/users/infinitered/events{/privacy}","received_events_url":"https://api.github.com/users/infinitered/received_events","type":"Organization","site_admin":false},"repo":{"id":51452356,"name":"ignite","full_name":"infinitered/ignite","owner":{"login":"infinitered","id":3902527,"avatar_url":"https://avatars.githubusercontent.com/u/3902527?v=3","gravatar_id":"","url":"https://api.github.com/users/infinitered","html_url":"https://github.com/infinitered","followers_url":"https://api.github.com/users/infinitered/followers","following_url":"https://api.github.com/users/infinitered/following{/other_user}","gists_url":"https://api.github.com/users/infinitered/gists{/gist_id}","starred_url":"https://api.github.com/users/infinitered/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/infinitered/subscriptions","organizations_url":"https://api.github.com/users/infinitered/orgs","repos_url":"https://api.github.com/users/infinitered/repos","events_url":"https://api.github.com/users/infinitered/events{/privacy}","received_events_url":"https://api.github.com/users/infinitered/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/infinitered/ignite","description":"The unfair starting CLI, Generator, and more for React Native","fork":false,"url":"https://api.github.com/repos/infinitered/ignite","forks_url":"https://api.github.com/repos/infinitered/ignite/forks","keys_url":"https://api.github.com/repos/infinitered/ignite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/infinitered/ignite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/infinitered/ignite/teams","hooks_url":"https://api.github.com/repos/infinitered/ignite/hooks","issue_events_url":"https://api.github.com/repos/infinitered/ignite/issues/events{/number}","events_url":"https://api.github.com/repos/infinitered/ignite/events","assignees_url":"https://api.github.com/repos/infinitered/ignite/assignees{/user}","branches_url":"https://api.github.com/repos/infinitered/ignite/branches{/branch}","tags_url":"https://api.github.com/repos/infinitered/ignite/tags","blobs_url":"https://api.github.com/repos/infinitered/ignite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/infinitered/ignite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/infinitered/ignite/git/refs{/sha}","trees_url":"https://api.github.com/repos/infinitered/ignite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/infinitered/ignite/statuses/{sha}","languages_url":"https://api.github.com/repos/infinitered/ignite/languages","stargazers_url":"https://api.github.com/repos/infinitered/ignite/stargazers","contributors_url":"https://api.github.com/repos/infinitered/ignite/contributors","subscribers_url":"https://api.github.com/repos/infinitered/ignite/subscribers","subscription_url":"https://api.github.com/repos/infinitered/ignite/subscription","commits_url":"https://api.github.com/repos/infinitered/ignite/commits{/sha}","git_commits_url":"https://api.github.com/repos/infinitered/ignite/git/commits{/sha}","comments_url":"https://api.github.com/repos/infinitered/ignite/comments{/number}","issue_comment_url":"https://api.github.com/repos/infinitered/ignite/issues/comments{/number}","contents_url":"https://api.github.com/repos/infinitered/ignite/contents/{+path}","compare_url":"https://api.github.com/repos/infinitered/ignite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/infinitered/ignite/merges","archive_url":"https://api.github.com/repos/infinitered/ignite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/infinitered/ignite/downloads","issues_url":"https://api.github.com/repos/infinitered/ignite/issues{/number}","pulls_url":"https://api.github.com/repos/infinitered/ignite/pulls{/number}","milestones_url":"https://api.github.com/repos/infinitered/ignite/milestones{/number}","notifications_url":"https://api.github.com/repos/infinitered/ignite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/infinitered/ignite/labels{/name}","releases_url":"https://api.github.com/repos/infinitered/ignite/releases{/id}","deployments_url":"https://api.github.com/repos/infinitered/ignite/deployments","created_at":"2016-02-10T16:06:07Z","updated_at":"2016-11-09T13:48:35Z","pushed_at":"2016-11-09T15:29:21Z","git_url":"git://github.com/infinitered/ignite.git","ssh_url":"git@github.com:infinitered/ignite.git","clone_url":"https://github.com/infinitered/ignite.git","svn_url":"https://github.com/infinitered/ignite","homepage":"","size":14473,"stargazers_count":2920,"watchers_count":2920,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":184,"mirror_url":null,"open_issues_count":63,"forks":184,"open_issues":63,"watchers":2920,"default_branch":"master"}},"base":{"label":"infinitered:master","ref":"master","sha":"de614f380590e108a183d8053017efd0a42cd4b2","user":{"login":"infinitered","id":3902527,"avatar_url":"https://avatars.githubusercontent.com/u/3902527?v=3","gravatar_id":"","url":"https://api.github.com/users/infinitered","html_url":"https://github.com/infinitered","followers_url":"https://api.github.com/users/infinitered/followers","following_url":"https://api.github.com/users/infinitered/following{/other_user}","gists_url":"https://api.github.com/users/infinitered/gists{/gist_id}","starred_url":"https://api.github.com/users/infinitered/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/infinitered/subscriptions","organizations_url":"https://api.github.com/users/infinitered/orgs","repos_url":"https://api.github.com/users/infinitered/repos","events_url":"https://api.github.com/users/infinitered/events{/privacy}","received_events_url":"https://api.github.com/users/infinitered/received_events","type":"Organization","site_admin":false},"repo":{"id":51452356,"name":"ignite","full_name":"infinitered/ignite","owner":{"login":"infinitered","id":3902527,"avatar_url":"https://avatars.githubusercontent.com/u/3902527?v=3","gravatar_id":"","url":"https://api.github.com/users/infinitered","html_url":"https://github.com/infinitered","followers_url":"https://api.github.com/users/infinitered/followers","following_url":"https://api.github.com/users/infinitered/following{/other_user}","gists_url":"https://api.github.com/users/infinitered/gists{/gist_id}","starred_url":"https://api.github.com/users/infinitered/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/infinitered/subscriptions","organizations_url":"https://api.github.com/users/infinitered/orgs","repos_url":"https://api.github.com/users/infinitered/repos","events_url":"https://api.github.com/users/infinitered/events{/privacy}","received_events_url":"https://api.github.com/users/infinitered/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/infinitered/ignite","description":"The unfair starting CLI, Generator, and more for React Native","fork":false,"url":"https://api.github.com/repos/infinitered/ignite","forks_url":"https://api.github.com/repos/infinitered/ignite/forks","keys_url":"https://api.github.com/repos/infinitered/ignite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/infinitered/ignite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/infinitered/ignite/teams","hooks_url":"https://api.github.com/repos/infinitered/ignite/hooks","issue_events_url":"https://api.github.com/repos/infinitered/ignite/issues/events{/number}","events_url":"https://api.github.com/repos/infinitered/ignite/events","assignees_url":"https://api.github.com/repos/infinitered/ignite/assignees{/user}","branches_url":"https://api.github.com/repos/infinitered/ignite/branches{/branch}","tags_url":"https://api.github.com/repos/infinitered/ignite/tags","blobs_url":"https://api.github.com/repos/infinitered/ignite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/infinitered/ignite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/infinitered/ignite/git/refs{/sha}","trees_url":"https://api.github.com/repos/infinitered/ignite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/infinitered/ignite/statuses/{sha}","languages_url":"https://api.github.com/repos/infinitered/ignite/languages","stargazers_url":"https://api.github.com/repos/infinitered/ignite/stargazers","contributors_url":"https://api.github.com/repos/infinitered/ignite/contributors","subscribers_url":"https://api.github.com/repos/infinitered/ignite/subscribers","subscription_url":"https://api.github.com/repos/infinitered/ignite/subscription","commits_url":"https://api.github.com/repos/infinitered/ignite/commits{/sha}","git_commits_url":"https://api.github.com/repos/infinitered/ignite/git/commits{/sha}","comments_url":"https://api.github.com/repos/infinitered/ignite/comments{/number}","issue_comment_url":"https://api.github.com/repos/infinitered/ignite/issues/comments{/number}","contents_url":"https://api.github.com/repos/infinitered/ignite/contents/{+path}","compare_url":"https://api.github.com/repos/infinitered/ignite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/infinitered/ignite/merges","archive_url":"https://api.github.com/repos/infinitered/ignite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/infinitered/ignite/downloads","issues_url":"https://api.github.com/repos/infinitered/ignite/issues{/number}","pulls_url":"https://api.github.com/repos/infinitered/ignite/pulls{/number}","milestones_url":"https://api.github.com/repos/infinitered/ignite/milestones{/number}","notifications_url":"https://api.github.com/repos/infinitered/ignite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/infinitered/ignite/labels{/name}","releases_url":"https://api.github.com/repos/infinitered/ignite/releases{/id}","deployments_url":"https://api.github.com/repos/infinitered/ignite/deployments","created_at":"2016-02-10T16:06:07Z","updated_at":"2016-11-09T13:48:35Z","pushed_at":"2016-11-09T15:29:21Z","git_url":"git://github.com/infinitered/ignite.git","ssh_url":"git@github.com:infinitered/ignite.git","clone_url":"https://github.com/infinitered/ignite.git","svn_url":"https://github.com/infinitered/ignite","homepage":"","size":14473,"stargazers_count":2920,"watchers_count":2920,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":184,"mirror_url":null,"open_issues_count":63,"forks":184,"open_issues":63,"watchers":2920,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/infinitered/ignite/pulls/486"},"html":{"href":"https://github.com/infinitered/ignite/pull/486"},"issue":{"href":"https://api.github.com/repos/infinitered/ignite/issues/486"},"comments":{"href":"https://api.github.com/repos/infinitered/ignite/issues/486/comments"},"review_comments":{"href":"https://api.github.com/repos/infinitered/ignite/pulls/486/comments"},"review_comment":{"href":"https://api.github.com/repos/infinitered/ignite/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/infinitered/ignite/pulls/486/commits"},"statuses":{"href":"https://api.github.com/repos/infinitered/ignite/statuses/71f15f70d65bb3b9aec01474a346a5fb685d3d15"}}}}
{"actor":{"display_login":"GantMan"}}