{"action":"created","issue":{"url":"https://api.github.com/repos/uploadcare/uploadcare-widget-react-demo/issues/2","repository_url":"https://api.github.com/repos/uploadcare/uploadcare-widget-react-demo","labels_url":"https://api.github.com/repos/uploadcare/uploadcare-widget-react-demo/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/uploadcare/uploadcare-widget-react-demo/issues/2/comments","events_url":"https://api.github.com/repos/uploadcare/uploadcare-widget-react-demo/issues/2/events","html_url":"https://github.com/uploadcare/uploadcare-widget-react-demo/issues/2","id":240719963,"number":2,"title":"How to save values to state?","user":{"login":"sarahmonster","id":376315,"avatar_url":"https://avatars1.githubusercontent.com/u/376315?v=3","gravatar_id":"","url":"https://api.github.com/users/sarahmonster","html_url":"https://github.com/sarahmonster","followers_url":"https://api.github.com/users/sarahmonster/followers","following_url":"https://api.github.com/users/sarahmonster/following{/other_user}","gists_url":"https://api.github.com/users/sarahmonster/gists{/gist_id}","starred_url":"https://api.github.com/users/sarahmonster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarahmonster/subscriptions","organizations_url":"https://api.github.com/users/sarahmonster/orgs","repos_url":"https://api.github.com/users/sarahmonster/repos","events_url":"https://api.github.com/users/sarahmonster/events{/privacy}","received_events_url":"https://api.github.com/users/sarahmonster/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-07-05T17:21:29Z","updated_at":"2017-07-05T21:38:27Z","closed_at":"2017-07-05T21:38:27Z","body":"I'm trying to incorporate this widget into a simple React app, but I'm having a bit of trouble getting the value of the file(s) from the widget. Here's my code, simplified slightly:\r\n\r\n```\r\nimport uploadcare from 'uploadcare-widget';\r\n\r\nclass UploaderBase extends Component {\r\n\tcomponentDidMount() {\r\n\t\tuploadcare.start({\r\n\t\t\tpublicKey: \"b98c93bb297c65020f2f\",\r\n\t\t\ttabs: \"file url facebook gdrive dropbox instagram\",\r\n\t\t\tclearable: \"true\"\r\n\t\t});\r\n\t}\r\n\r\n  \thandleChange = (color, event) => {\r\n  \t\tconst { dispatch } = this.props;\r\n  \t\tdispatch({ type: 'SET_FORM_PROP', payload: { name: 'logo', value: this.props.logo } });\r\n  \t};\r\n\r\n  render() {\r\n    return (\r\n        <input type=\"text\" role=\"uploadcare-uploader\" name=\"logo\" crop=\"\" imagesOnly=\"true\"} onChange={ this.handleChange } />\r\n    )\r\n  }\r\n}\r\n```\r\n\r\nTrouble is, the onChange event never fires—I think because it's the widget changing the value, not the user. onBlur doesn't work either, for obvious reasons. Is there some kind of method I can call in order to save the value that's being input here, so that I can use it in my app?"},"comment":{"url":"https://api.github.com/repos/uploadcare/uploadcare-widget-react-demo/issues/comments/313234307","html_url":"https://github.com/uploadcare/uploadcare-widget-react-demo/issues/2#issuecomment-313234307","issue_url":"https://api.github.com/repos/uploadcare/uploadcare-widget-react-demo/issues/2","id":313234307,"user":{"login":"sarahmonster","id":376315,"avatar_url":"https://avatars1.githubusercontent.com/u/376315?v=3","gravatar_id":"","url":"https://api.github.com/users/sarahmonster","html_url":"https://github.com/sarahmonster","followers_url":"https://api.github.com/users/sarahmonster/followers","following_url":"https://api.github.com/users/sarahmonster/following{/other_user}","gists_url":"https://api.github.com/users/sarahmonster/gists{/gist_id}","starred_url":"https://api.github.com/users/sarahmonster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarahmonster/subscriptions","organizations_url":"https://api.github.com/users/sarahmonster/orgs","repos_url":"https://api.github.com/users/sarahmonster/repos","events_url":"https://api.github.com/users/sarahmonster/events{/privacy}","received_events_url":"https://api.github.com/users/sarahmonster/received_events","type":"User","site_admin":false},"created_at":"2017-07-05T21:38:27Z","updated_at":"2017-07-05T21:38:27Z","body":"Amazing, thank you so much for that @Zmoki! I adjusted it a bit to work with Redux, and now things are working properly for me. 🎉\r\n\r\nSuper appreciate the speedy response!"}}
{"actor":{"display_login":"sarahmonster"}}