{"action":"created","comment":{"url":"https://api.github.com/repos/ziir/pariswebapp/pulls/comments/222095099","pull_request_review_id":160901616,"id":222095099,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMjA5NTA5OQ==","diff_hunk":"@@ -1,21 +1,34 @@\n // @flow\n \n import React from 'react';\n+import debounce from 'lodash.debounce';\n \n type Props = {|\n   +className?: string,\n   +label: string,\n-  +value: string,\n-  +onChange: string => mixed,\n+  +changeCallback: string => mixed,\n |};\n \n-export default class InputField extends React.PureComponent<Props> {\n+type State = {\n+  value: string,\n+};\n+\n+export default class InputField extends React.PureComponent<Props, State> {\n+  state = { value: '' };\n+  changeCallback = debounce(this.props.changeCallback, 100, { leading: true });\n+\n   onChange(e: SyntheticInputEvent<HTMLInputElement>) {\n-    this.props.onChange(e.currentTarget.value.trim());\n+    const value = e.currentTarget.value.trim().toLowerCase();","path":"react-4/src/InputField.js","position":26,"original_position":25,"commit_id":"3ff91faf93e049ddb93f805dc2bfe2e8662c1db5","original_commit_id":"3ff91faf93e049ddb93f805dc2bfe2e8662c1db5","user":{"login":"julienw","id":454175,"node_id":"MDQ6VXNlcjQ1NDE3NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/454175?v=4","gravatar_id":"","url":"https://api.github.com/users/julienw","html_url":"https://github.com/julienw","followers_url":"https://api.github.com/users/julienw/followers","following_url":"https://api.github.com/users/julienw/following{/other_user}","gists_url":"https://api.github.com/users/julienw/gists{/gist_id}","starred_url":"https://api.github.com/users/julienw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julienw/subscriptions","organizations_url":"https://api.github.com/users/julienw/orgs","repos_url":"https://api.github.com/users/julienw/repos","events_url":"https://api.github.com/users/julienw/events{/privacy}","received_events_url":"https://api.github.com/users/julienw/received_events","type":"User","site_admin":false},"body":"Je crois qu'il faut garder le traitement de la valeur du côté de l'utilisateur du composant, l'InputField doit rester neutre par rapport à l'entrée utilisateur. En effet, le comportement est vraiment bizarre comme ça car ça empêche de taper des trucs (notamment une recherche avec un espace !)","created_at":"2018-10-02T20:11:23Z","updated_at":"2018-10-02T20:18:49Z","html_url":"https://github.com/ziir/pariswebapp/pull/22#discussion_r222095099","pull_request_url":"https://api.github.com/repos/ziir/pariswebapp/pulls/22","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/ziir/pariswebapp/pulls/comments/222095099"},"html":{"href":"https://github.com/ziir/pariswebapp/pull/22#discussion_r222095099"},"pull_request":{"href":"https://api.github.com/repos/ziir/pariswebapp/pulls/22"}}},"pull_request":{"url":"https://api.github.com/repos/ziir/pariswebapp/pulls/22","id":219663969,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5NjYzOTY5","html_url":"https://github.com/ziir/pariswebapp/pull/22","diff_url":"https://github.com/ziir/pariswebapp/pull/22.diff","patch_url":"https://github.com/ziir/pariswebapp/pull/22.patch","issue_url":"https://api.github.com/repos/ziir/pariswebapp/issues/22","number":22,"state":"open","locked":false,"title":"Add react-4 changes","user":{"login":"ziir","id":2394128,"node_id":"MDQ6VXNlcjIzOTQxMjg=","avatar_url":"https://avatars2.githubusercontent.com/u/2394128?v=4","gravatar_id":"","url":"https://api.github.com/users/ziir","html_url":"https://github.com/ziir","followers_url":"https://api.github.com/users/ziir/followers","following_url":"https://api.github.com/users/ziir/following{/other_user}","gists_url":"https://api.github.com/users/ziir/gists{/gist_id}","starred_url":"https://api.github.com/users/ziir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ziir/subscriptions","organizations_url":"https://api.github.com/users/ziir/orgs","repos_url":"https://api.github.com/users/ziir/repos","events_url":"https://api.github.com/users/ziir/events{/privacy}","received_events_url":"https://api.github.com/users/ziir/received_events","type":"User","site_admin":false},"body":"- [x] `InputField` as a `PureComponent`\r\n- [x] `ListItem` with a `key`\r\n- [x] `ListItem` as a `PureComponent`\r\n- [x] `debounce` `InputField` `onChange` callback\r\n","created_at":"2018-10-02T11:02:08Z","updated_at":"2018-10-02T20:18:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e75bb9215f4d4988a558acdd5171dd536d8e3188","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ziir/pariswebapp/pulls/22/commits","review_comments_url":"https://api.github.com/repos/ziir/pariswebapp/pulls/22/comments","review_comment_url":"https://api.github.com/repos/ziir/pariswebapp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ziir/pariswebapp/issues/22/comments","statuses_url":"https://api.github.com/repos/ziir/pariswebapp/statuses/3ff91faf93e049ddb93f805dc2bfe2e8662c1db5","head":{"label":"ziir:react-4","ref":"react-4","sha":"3ff91faf93e049ddb93f805dc2bfe2e8662c1db5","user":{"login":"ziir","id":2394128,"node_id":"MDQ6VXNlcjIzOTQxMjg=","avatar_url":"https://avatars2.githubusercontent.com/u/2394128?v=4","gravatar_id":"","url":"https://api.github.com/users/ziir","html_url":"https://github.com/ziir","followers_url":"https://api.github.com/users/ziir/followers","following_url":"https://api.github.com/users/ziir/following{/other_user}","gists_url":"https://api.github.com/users/ziir/gists{/gist_id}","starred_url":"https://api.github.com/users/ziir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ziir/subscriptions","organizations_url":"https://api.github.com/users/ziir/orgs","repos_url":"https://api.github.com/users/ziir/repos","events_url":"https://api.github.com/users/ziir/events{/privacy}","received_events_url":"https://api.github.com/users/ziir/received_events","type":"User","site_admin":false},"repo":{"id":150012865,"node_id":"MDEwOlJlcG9zaXRvcnkxNTAwMTI4NjU=","name":"pariswebapp","full_name":"ziir/pariswebapp","private":false,"owner":{"login":"ziir","id":2394128,"node_id":"MDQ6VXNlcjIzOTQxMjg=","avatar_url":"https://avatars2.githubusercontent.com/u/2394128?v=4","gravatar_id":"","url":"https://api.github.com/users/ziir","html_url":"https://github.com/ziir","followers_url":"https://api.github.com/users/ziir/followers","following_url":"https://api.github.com/users/ziir/following{/other_user}","gists_url":"https://api.github.com/users/ziir/gists{/gist_id}","starred_url":"https://api.github.com/users/ziir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ziir/subscriptions","organizations_url":"https://api.github.com/users/ziir/orgs","repos_url":"https://api.github.com/users/ziir/repos","events_url":"https://api.github.com/users/ziir/events{/privacy}","received_events_url":"https://api.github.com/users/ziir/received_events","type":"User","site_admin":false},"html_url":"https://github.com/ziir/pariswebapp","description":"Paris Web app","fork":false,"url":"https://api.github.com/repos/ziir/pariswebapp","forks_url":"https://api.github.com/repos/ziir/pariswebapp/forks","keys_url":"https://api.github.com/repos/ziir/pariswebapp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ziir/pariswebapp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ziir/pariswebapp/teams","hooks_url":"https://api.github.com/repos/ziir/pariswebapp/hooks","issue_events_url":"https://api.github.com/repos/ziir/pariswebapp/issues/events{/number}","events_url":"https://api.github.com/repos/ziir/pariswebapp/events","assignees_url":"https://api.github.com/repos/ziir/pariswebapp/assignees{/user}","branches_url":"https://api.github.com/repos/ziir/pariswebapp/branches{/branch}","tags_url":"https://api.github.com/repos/ziir/pariswebapp/tags","blobs_url":"https://api.github.com/repos/ziir/pariswebapp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ziir/pariswebapp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ziir/pariswebapp/git/refs{/sha}","trees_url":"https://api.github.com/repos/ziir/pariswebapp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ziir/pariswebapp/statuses/{sha}","languages_url":"https://api.github.com/repos/ziir/pariswebapp/languages","stargazers_url":"https://api.github.com/repos/ziir/pariswebapp/stargazers","contributors_url":"https://api.github.com/repos/ziir/pariswebapp/contributors","subscribers_url":"https://api.github.com/repos/ziir/pariswebapp/subscribers","subscription_url":"https://api.github.com/repos/ziir/pariswebapp/subscription","commits_url":"https://api.github.com/repos/ziir/pariswebapp/commits{/sha}","git_commits_url":"https://api.github.com/repos/ziir/pariswebapp/git/commits{/sha}","comments_url":"https://api.github.com/repos/ziir/pariswebapp/comments{/number}","issue_comment_url":"https://api.github.com/repos/ziir/pariswebapp/issues/comments{/number}","contents_url":"https://api.github.com/repos/ziir/pariswebapp/contents/{+path}","compare_url":"https://api.github.com/repos/ziir/pariswebapp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ziir/pariswebapp/merges","archive_url":"https://api.github.com/repos/ziir/pariswebapp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ziir/pariswebapp/downloads","issues_url":"https://api.github.com/repos/ziir/pariswebapp/issues{/number}","pulls_url":"https://api.github.com/repos/ziir/pariswebapp/pulls{/number}","milestones_url":"https://api.github.com/repos/ziir/pariswebapp/milestones{/number}","notifications_url":"https://api.github.com/repos/ziir/pariswebapp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ziir/pariswebapp/labels{/name}","releases_url":"https://api.github.com/repos/ziir/pariswebapp/releases{/id}","deployments_url":"https://api.github.com/repos/ziir/pariswebapp/deployments","created_at":"2018-09-23T18:24:29Z","updated_at":"2018-10-02T14:31:58Z","pushed_at":"2018-10-02T18:43:43Z","git_url":"git://github.com/ziir/pariswebapp.git","ssh_url":"git@github.com:ziir/pariswebapp.git","clone_url":"https://github.com/ziir/pariswebapp.git","svn_url":"https://github.com/ziir/pariswebapp","homepage":null,"size":363,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"ziir:master","ref":"master","sha":"ac0e3af602e3fa145c86ea53de89c781b5e2bf62","user":{"login":"ziir","id":2394128,"node_id":"MDQ6VXNlcjIzOTQxMjg=","avatar_url":"https://avatars2.githubusercontent.com/u/2394128?v=4","gravatar_id":"","url":"https://api.github.com/users/ziir","html_url":"https://github.com/ziir","followers_url":"https://api.github.com/users/ziir/followers","following_url":"https://api.github.com/users/ziir/following{/other_user}","gists_url":"https://api.github.com/users/ziir/gists{/gist_id}","starred_url":"https://api.github.com/users/ziir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ziir/subscriptions","organizations_url":"https://api.github.com/users/ziir/orgs","repos_url":"https://api.github.com/users/ziir/repos","events_url":"https://api.github.com/users/ziir/events{/privacy}","received_events_url":"https://api.github.com/users/ziir/received_events","type":"User","site_admin":false},"repo":{"id":150012865,"node_id":"MDEwOlJlcG9zaXRvcnkxNTAwMTI4NjU=","name":"pariswebapp","full_name":"ziir/pariswebapp","private":false,"owner":{"login":"ziir","id":2394128,"node_id":"MDQ6VXNlcjIzOTQxMjg=","avatar_url":"https://avatars2.githubusercontent.com/u/2394128?v=4","gravatar_id":"","url":"https://api.github.com/users/ziir","html_url":"https://github.com/ziir","followers_url":"https://api.github.com/users/ziir/followers","following_url":"https://api.github.com/users/ziir/following{/other_user}","gists_url":"https://api.github.com/users/ziir/gists{/gist_id}","starred_url":"https://api.github.com/users/ziir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ziir/subscriptions","organizations_url":"https://api.github.com/users/ziir/orgs","repos_url":"https://api.github.com/users/ziir/repos","events_url":"https://api.github.com/users/ziir/events{/privacy}","received_events_url":"https://api.github.com/users/ziir/received_events","type":"User","site_admin":false},"html_url":"https://github.com/ziir/pariswebapp","description":"Paris Web app","fork":false,"url":"https://api.github.com/repos/ziir/pariswebapp","forks_url":"https://api.github.com/repos/ziir/pariswebapp/forks","keys_url":"https://api.github.com/repos/ziir/pariswebapp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ziir/pariswebapp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ziir/pariswebapp/teams","hooks_url":"https://api.github.com/repos/ziir/pariswebapp/hooks","issue_events_url":"https://api.github.com/repos/ziir/pariswebapp/issues/events{/number}","events_url":"https://api.github.com/repos/ziir/pariswebapp/events","assignees_url":"https://api.github.com/repos/ziir/pariswebapp/assignees{/user}","branches_url":"https://api.github.com/repos/ziir/pariswebapp/branches{/branch}","tags_url":"https://api.github.com/repos/ziir/pariswebapp/tags","blobs_url":"https://api.github.com/repos/ziir/pariswebapp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ziir/pariswebapp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ziir/pariswebapp/git/refs{/sha}","trees_url":"https://api.github.com/repos/ziir/pariswebapp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ziir/pariswebapp/statuses/{sha}","languages_url":"https://api.github.com/repos/ziir/pariswebapp/languages","stargazers_url":"https://api.github.com/repos/ziir/pariswebapp/stargazers","contributors_url":"https://api.github.com/repos/ziir/pariswebapp/contributors","subscribers_url":"https://api.github.com/repos/ziir/pariswebapp/subscribers","subscription_url":"https://api.github.com/repos/ziir/pariswebapp/subscription","commits_url":"https://api.github.com/repos/ziir/pariswebapp/commits{/sha}","git_commits_url":"https://api.github.com/repos/ziir/pariswebapp/git/commits{/sha}","comments_url":"https://api.github.com/repos/ziir/pariswebapp/comments{/number}","issue_comment_url":"https://api.github.com/repos/ziir/pariswebapp/issues/comments{/number}","contents_url":"https://api.github.com/repos/ziir/pariswebapp/contents/{+path}","compare_url":"https://api.github.com/repos/ziir/pariswebapp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ziir/pariswebapp/merges","archive_url":"https://api.github.com/repos/ziir/pariswebapp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ziir/pariswebapp/downloads","issues_url":"https://api.github.com/repos/ziir/pariswebapp/issues{/number}","pulls_url":"https://api.github.com/repos/ziir/pariswebapp/pulls{/number}","milestones_url":"https://api.github.com/repos/ziir/pariswebapp/milestones{/number}","notifications_url":"https://api.github.com/repos/ziir/pariswebapp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ziir/pariswebapp/labels{/name}","releases_url":"https://api.github.com/repos/ziir/pariswebapp/releases{/id}","deployments_url":"https://api.github.com/repos/ziir/pariswebapp/deployments","created_at":"2018-09-23T18:24:29Z","updated_at":"2018-10-02T14:31:58Z","pushed_at":"2018-10-02T18:43:43Z","git_url":"git://github.com/ziir/pariswebapp.git","ssh_url":"git@github.com:ziir/pariswebapp.git","clone_url":"https://github.com/ziir/pariswebapp.git","svn_url":"https://github.com/ziir/pariswebapp","homepage":null,"size":363,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ziir/pariswebapp/pulls/22"},"html":{"href":"https://github.com/ziir/pariswebapp/pull/22"},"issue":{"href":"https://api.github.com/repos/ziir/pariswebapp/issues/22"},"comments":{"href":"https://api.github.com/repos/ziir/pariswebapp/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/ziir/pariswebapp/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/ziir/pariswebapp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ziir/pariswebapp/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/ziir/pariswebapp/statuses/3ff91faf93e049ddb93f805dc2bfe2e8662c1db5"}},"author_association":"OWNER"}}
{"actor":{"display_login":"julienw"}}