{"action":"created","comment":{"url":"https://api.github.com/repos/alvteren/react-domian/pulls/comments/188512775","pull_request_review_id":120504266,"id":188512775,"diff_hunk":"@@ -23,17 +24,61 @@ import Done from \"material-ui-icons/Done\";\n \n import { ListItem, ListItemText } from \"material-ui/List\";\n \n+function TextMaskCustom(props) {\n+  const { inputRef, ...other } = props;\n+\n+  return (\n+    <MaskedInput\n+      {...other}\n+      ref={inputRef}\n+      mask={[\"+\", \"7\", \"(\", /[1-9]/, /\\d/, /\\d/, \")\", /\\d/, /\\d/, /\\d/, '-', /\\d/, /\\d/, '-', /\\d/, /\\d/]}\n+      //showMask\n+    />\n+  );\n+}\n+\n class Field extends React.Component {\n   state = {\n     edit: get(this.props, \"edit\", false),\n-    needSave: false\n+    needSave: false,\n+    tel: \"\"\n+  };\n+\n+  handleTelInputChange = name => event => {\n+    this.setState({\n+      [name]: event.target.value,\n+    });\n+    this.props.handleChange(event);\n+  };\n+\n+  onTelInputFocus = event => {\n+    if (!this.state.tel) {\n+      this.setState({tel: \"9\"});\n+      event.target.selectionStart = 2; // not working\n+    }\n+  };\n+\n+  onTelInputBlur = event => {\n+    if (this.state.tel === \"9\") {\n+      this.setState({tel: \"\"});\n+    }\n   };\n \n   onStartEdit = () => {\n     this.setState({ edit: true, needSave: true });\n   };\n-  onSave = id => e => {\n-    this.props.saveToServer(id);\n+  onSave = propId => e => {\n+    console.log(\"FIRE\");\n+    const { fields, values, entityId } = this.props;\n+    const error = fieldValidate({form: values, fields, entityId, propId});\n+    if (error instanceof Object) {\n+      console.log(\"ERROR\", error);\n+      this.props.formValidateError(error);\n+      return;\n+    }\n+    console.log(\"FIRE2\");\n+    this.props.saveToServer(propId);\n+    console.log(\"FIRE3\");","path":"src/crm/Field/index.jsx","position":83,"original_position":83,"commit_id":"912aad96ee9b400b4d48a7275a93dd53fee34e05","original_commit_id":"912aad96ee9b400b4d48a7275a93dd53fee34e05","user":{"login":"alvteren","id":17045072,"avatar_url":"https://avatars0.githubusercontent.com/u/17045072?v=4","gravatar_id":"","url":"https://api.github.com/users/alvteren","html_url":"https://github.com/alvteren","followers_url":"https://api.github.com/users/alvteren/followers","following_url":"https://api.github.com/users/alvteren/following{/other_user}","gists_url":"https://api.github.com/users/alvteren/gists{/gist_id}","starred_url":"https://api.github.com/users/alvteren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alvteren/subscriptions","organizations_url":"https://api.github.com/users/alvteren/orgs","repos_url":"https://api.github.com/users/alvteren/repos","events_url":"https://api.github.com/users/alvteren/events{/privacy}","received_events_url":"https://api.github.com/users/alvteren/received_events","type":"User","site_admin":false},"body":"`console.log` надо почистить","created_at":"2018-05-16T06:18:28Z","updated_at":"2018-05-16T06:33:55Z","html_url":"https://github.com/alvteren/react-domian/pull/22#discussion_r188512775","pull_request_url":"https://api.github.com/repos/alvteren/react-domian/pulls/22","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/alvteren/react-domian/pulls/comments/188512775"},"html":{"href":"https://github.com/alvteren/react-domian/pull/22#discussion_r188512775"},"pull_request":{"href":"https://api.github.com/repos/alvteren/react-domian/pulls/22"}}},"pull_request":{"url":"https://api.github.com/repos/alvteren/react-domian/pulls/22","id":187933788,"html_url":"https://github.com/alvteren/react-domian/pull/22","diff_url":"https://github.com/alvteren/react-domian/pull/22.diff","patch_url":"https://github.com/alvteren/react-domian/pull/22.patch","issue_url":"https://api.github.com/repos/alvteren/react-domian/issues/22","number":22,"state":"open","locked":false,"title":"Lead add new#2033f8c31d8ed","user":{"login":"laplandin","id":18442215,"avatar_url":"https://avatars1.githubusercontent.com/u/18442215?v=4","gravatar_id":"","url":"https://api.github.com/users/laplandin","html_url":"https://github.com/laplandin","followers_url":"https://api.github.com/users/laplandin/followers","following_url":"https://api.github.com/users/laplandin/following{/other_user}","gists_url":"https://api.github.com/users/laplandin/gists{/gist_id}","starred_url":"https://api.github.com/users/laplandin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laplandin/subscriptions","organizations_url":"https://api.github.com/users/laplandin/orgs","repos_url":"https://api.github.com/users/laplandin/repos","events_url":"https://api.github.com/users/laplandin/events{/privacy}","received_events_url":"https://api.github.com/users/laplandin/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-05-14T19:57:12Z","updated_at":"2018-05-16T06:33:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"350ad874f6f344682945b18da60fa3472c0604f0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/alvteren/react-domian/pulls/22/commits","review_comments_url":"https://api.github.com/repos/alvteren/react-domian/pulls/22/comments","review_comment_url":"https://api.github.com/repos/alvteren/react-domian/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alvteren/react-domian/issues/22/comments","statuses_url":"https://api.github.com/repos/alvteren/react-domian/statuses/912aad96ee9b400b4d48a7275a93dd53fee34e05","head":{"label":"alvteren:LEAD_ADD_NEW#2033f8c31d8ed","ref":"LEAD_ADD_NEW#2033f8c31d8ed","sha":"912aad96ee9b400b4d48a7275a93dd53fee34e05","user":{"login":"alvteren","id":17045072,"avatar_url":"https://avatars0.githubusercontent.com/u/17045072?v=4","gravatar_id":"","url":"https://api.github.com/users/alvteren","html_url":"https://github.com/alvteren","followers_url":"https://api.github.com/users/alvteren/followers","following_url":"https://api.github.com/users/alvteren/following{/other_user}","gists_url":"https://api.github.com/users/alvteren/gists{/gist_id}","starred_url":"https://api.github.com/users/alvteren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alvteren/subscriptions","organizations_url":"https://api.github.com/users/alvteren/orgs","repos_url":"https://api.github.com/users/alvteren/repos","events_url":"https://api.github.com/users/alvteren/events{/privacy}","received_events_url":"https://api.github.com/users/alvteren/received_events","type":"User","site_admin":false},"repo":{"id":107551004,"name":"react-domian","full_name":"alvteren/react-domian","owner":{"login":"alvteren","id":17045072,"avatar_url":"https://avatars0.githubusercontent.com/u/17045072?v=4","gravatar_id":"","url":"https://api.github.com/users/alvteren","html_url":"https://github.com/alvteren","followers_url":"https://api.github.com/users/alvteren/followers","following_url":"https://api.github.com/users/alvteren/following{/other_user}","gists_url":"https://api.github.com/users/alvteren/gists{/gist_id}","starred_url":"https://api.github.com/users/alvteren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alvteren/subscriptions","organizations_url":"https://api.github.com/users/alvteren/orgs","repos_url":"https://api.github.com/users/alvteren/repos","events_url":"https://api.github.com/users/alvteren/events{/privacy}","received_events_url":"https://api.github.com/users/alvteren/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alvteren/react-domian","description":null,"fork":false,"url":"https://api.github.com/repos/alvteren/react-domian","forks_url":"https://api.github.com/repos/alvteren/react-domian/forks","keys_url":"https://api.github.com/repos/alvteren/react-domian/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alvteren/react-domian/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alvteren/react-domian/teams","hooks_url":"https://api.github.com/repos/alvteren/react-domian/hooks","issue_events_url":"https://api.github.com/repos/alvteren/react-domian/issues/events{/number}","events_url":"https://api.github.com/repos/alvteren/react-domian/events","assignees_url":"https://api.github.com/repos/alvteren/react-domian/assignees{/user}","branches_url":"https://api.github.com/repos/alvteren/react-domian/branches{/branch}","tags_url":"https://api.github.com/repos/alvteren/react-domian/tags","blobs_url":"https://api.github.com/repos/alvteren/react-domian/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alvteren/react-domian/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alvteren/react-domian/git/refs{/sha}","trees_url":"https://api.github.com/repos/alvteren/react-domian/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alvteren/react-domian/statuses/{sha}","languages_url":"https://api.github.com/repos/alvteren/react-domian/languages","stargazers_url":"https://api.github.com/repos/alvteren/react-domian/stargazers","contributors_url":"https://api.github.com/repos/alvteren/react-domian/contributors","subscribers_url":"https://api.github.com/repos/alvteren/react-domian/subscribers","subscription_url":"https://api.github.com/repos/alvteren/react-domian/subscription","commits_url":"https://api.github.com/repos/alvteren/react-domian/commits{/sha}","git_commits_url":"https://api.github.com/repos/alvteren/react-domian/git/commits{/sha}","comments_url":"https://api.github.com/repos/alvteren/react-domian/comments{/number}","issue_comment_url":"https://api.github.com/repos/alvteren/react-domian/issues/comments{/number}","contents_url":"https://api.github.com/repos/alvteren/react-domian/contents/{+path}","compare_url":"https://api.github.com/repos/alvteren/react-domian/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alvteren/react-domian/merges","archive_url":"https://api.github.com/repos/alvteren/react-domian/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alvteren/react-domian/downloads","issues_url":"https://api.github.com/repos/alvteren/react-domian/issues{/number}","pulls_url":"https://api.github.com/repos/alvteren/react-domian/pulls{/number}","milestones_url":"https://api.github.com/repos/alvteren/react-domian/milestones{/number}","notifications_url":"https://api.github.com/repos/alvteren/react-domian/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alvteren/react-domian/labels{/name}","releases_url":"https://api.github.com/repos/alvteren/react-domian/releases{/id}","deployments_url":"https://api.github.com/repos/alvteren/react-domian/deployments","created_at":"2017-10-19T13:36:24Z","updated_at":"2018-04-27T12:50:02Z","pushed_at":"2018-05-15T22:29:21Z","git_url":"git://github.com/alvteren/react-domian.git","ssh_url":"git@github.com:alvteren/react-domian.git","clone_url":"https://github.com/alvteren/react-domian.git","svn_url":"https://github.com/alvteren/react-domian","homepage":null,"size":422,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"alvteren:dev","ref":"dev","sha":"b4fe9fde36513703671df4ad82189fc534c9e8ac","user":{"login":"alvteren","id":17045072,"avatar_url":"https://avatars0.githubusercontent.com/u/17045072?v=4","gravatar_id":"","url":"https://api.github.com/users/alvteren","html_url":"https://github.com/alvteren","followers_url":"https://api.github.com/users/alvteren/followers","following_url":"https://api.github.com/users/alvteren/following{/other_user}","gists_url":"https://api.github.com/users/alvteren/gists{/gist_id}","starred_url":"https://api.github.com/users/alvteren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alvteren/subscriptions","organizations_url":"https://api.github.com/users/alvteren/orgs","repos_url":"https://api.github.com/users/alvteren/repos","events_url":"https://api.github.com/users/alvteren/events{/privacy}","received_events_url":"https://api.github.com/users/alvteren/received_events","type":"User","site_admin":false},"repo":{"id":107551004,"name":"react-domian","full_name":"alvteren/react-domian","owner":{"login":"alvteren","id":17045072,"avatar_url":"https://avatars0.githubusercontent.com/u/17045072?v=4","gravatar_id":"","url":"https://api.github.com/users/alvteren","html_url":"https://github.com/alvteren","followers_url":"https://api.github.com/users/alvteren/followers","following_url":"https://api.github.com/users/alvteren/following{/other_user}","gists_url":"https://api.github.com/users/alvteren/gists{/gist_id}","starred_url":"https://api.github.com/users/alvteren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alvteren/subscriptions","organizations_url":"https://api.github.com/users/alvteren/orgs","repos_url":"https://api.github.com/users/alvteren/repos","events_url":"https://api.github.com/users/alvteren/events{/privacy}","received_events_url":"https://api.github.com/users/alvteren/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alvteren/react-domian","description":null,"fork":false,"url":"https://api.github.com/repos/alvteren/react-domian","forks_url":"https://api.github.com/repos/alvteren/react-domian/forks","keys_url":"https://api.github.com/repos/alvteren/react-domian/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alvteren/react-domian/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alvteren/react-domian/teams","hooks_url":"https://api.github.com/repos/alvteren/react-domian/hooks","issue_events_url":"https://api.github.com/repos/alvteren/react-domian/issues/events{/number}","events_url":"https://api.github.com/repos/alvteren/react-domian/events","assignees_url":"https://api.github.com/repos/alvteren/react-domian/assignees{/user}","branches_url":"https://api.github.com/repos/alvteren/react-domian/branches{/branch}","tags_url":"https://api.github.com/repos/alvteren/react-domian/tags","blobs_url":"https://api.github.com/repos/alvteren/react-domian/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alvteren/react-domian/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alvteren/react-domian/git/refs{/sha}","trees_url":"https://api.github.com/repos/alvteren/react-domian/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alvteren/react-domian/statuses/{sha}","languages_url":"https://api.github.com/repos/alvteren/react-domian/languages","stargazers_url":"https://api.github.com/repos/alvteren/react-domian/stargazers","contributors_url":"https://api.github.com/repos/alvteren/react-domian/contributors","subscribers_url":"https://api.github.com/repos/alvteren/react-domian/subscribers","subscription_url":"https://api.github.com/repos/alvteren/react-domian/subscription","commits_url":"https://api.github.com/repos/alvteren/react-domian/commits{/sha}","git_commits_url":"https://api.github.com/repos/alvteren/react-domian/git/commits{/sha}","comments_url":"https://api.github.com/repos/alvteren/react-domian/comments{/number}","issue_comment_url":"https://api.github.com/repos/alvteren/react-domian/issues/comments{/number}","contents_url":"https://api.github.com/repos/alvteren/react-domian/contents/{+path}","compare_url":"https://api.github.com/repos/alvteren/react-domian/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alvteren/react-domian/merges","archive_url":"https://api.github.com/repos/alvteren/react-domian/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alvteren/react-domian/downloads","issues_url":"https://api.github.com/repos/alvteren/react-domian/issues{/number}","pulls_url":"https://api.github.com/repos/alvteren/react-domian/pulls{/number}","milestones_url":"https://api.github.com/repos/alvteren/react-domian/milestones{/number}","notifications_url":"https://api.github.com/repos/alvteren/react-domian/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alvteren/react-domian/labels{/name}","releases_url":"https://api.github.com/repos/alvteren/react-domian/releases{/id}","deployments_url":"https://api.github.com/repos/alvteren/react-domian/deployments","created_at":"2017-10-19T13:36:24Z","updated_at":"2018-04-27T12:50:02Z","pushed_at":"2018-05-15T22:29:21Z","git_url":"git://github.com/alvteren/react-domian.git","ssh_url":"git@github.com:alvteren/react-domian.git","clone_url":"https://github.com/alvteren/react-domian.git","svn_url":"https://github.com/alvteren/react-domian","homepage":null,"size":422,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alvteren/react-domian/pulls/22"},"html":{"href":"https://github.com/alvteren/react-domian/pull/22"},"issue":{"href":"https://api.github.com/repos/alvteren/react-domian/issues/22"},"comments":{"href":"https://api.github.com/repos/alvteren/react-domian/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/alvteren/react-domian/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/alvteren/react-domian/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alvteren/react-domian/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/alvteren/react-domian/statuses/912aad96ee9b400b4d48a7275a93dd53fee34e05"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"alvteren"}}