{"action":"created","issue":{"url":"https://api.github.com/repos/erikras/redux-form/issues/152","repository_url":"https://api.github.com/repos/erikras/redux-form","labels_url":"https://api.github.com/repos/erikras/redux-form/issues/152/labels{/name}","comments_url":"https://api.github.com/repos/erikras/redux-form/issues/152/comments","events_url":"https://api.github.com/repos/erikras/redux-form/issues/152/events","html_url":"https://github.com/erikras/redux-form/issues/152","id":112146031,"number":152,"title":"Best practice to manipulate a field's value","user":{"login":"mohebifar","id":6104558,"avatar_url":"https://avatars2.githubusercontent.com/u/6104558?v=3","gravatar_id":"","url":"https://api.github.com/users/mohebifar","html_url":"https://github.com/mohebifar","followers_url":"https://api.github.com/users/mohebifar/followers","following_url":"https://api.github.com/users/mohebifar/following{/other_user}","gists_url":"https://api.github.com/users/mohebifar/gists{/gist_id}","starred_url":"https://api.github.com/users/mohebifar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mohebifar/subscriptions","organizations_url":"https://api.github.com/users/mohebifar/orgs","repos_url":"https://api.github.com/users/mohebifar/repos","events_url":"https://api.github.com/users/mohebifar/events{/privacy}","received_events_url":"https://api.github.com/users/mohebifar/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":32,"created_at":"2015-10-19T13:37:43Z","updated_at":"2017-05-31T11:14:43Z","closed_at":"2015-10-26T14:51:26Z","body":"Assume that I need to change the value of username input field upon the change of last name field. The reason why the username should be kept on the input is to let the user manipulating it. The way to do it is to call the `change` action to change the value of _username_ input. But we need to override the `onChange` prop on _lastName_ input. It seems sloppy and I wonder if it has drawbacks.\n\n``` jsx\n<input {...lastName} />\n<input {...username} />\n```\n"},"comment":{"url":"https://api.github.com/repos/erikras/redux-form/issues/comments/305160161","html_url":"https://github.com/erikras/redux-form/issues/152#issuecomment-305160161","issue_url":"https://api.github.com/repos/erikras/redux-form/issues/152","id":305160161,"user":{"login":"anmol1591","id":28974363,"avatar_url":"https://avatars0.githubusercontent.com/u/28974363?v=3","gravatar_id":"","url":"https://api.github.com/users/anmol1591","html_url":"https://github.com/anmol1591","followers_url":"https://api.github.com/users/anmol1591/followers","following_url":"https://api.github.com/users/anmol1591/following{/other_user}","gists_url":"https://api.github.com/users/anmol1591/gists{/gist_id}","starred_url":"https://api.github.com/users/anmol1591/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anmol1591/subscriptions","organizations_url":"https://api.github.com/users/anmol1591/orgs","repos_url":"https://api.github.com/users/anmol1591/repos","events_url":"https://api.github.com/users/anmol1591/events{/privacy}","received_events_url":"https://api.github.com/users/anmol1591/received_events","type":"User","site_admin":false},"created_at":"2017-05-31T11:14:43Z","updated_at":"2017-05-31T11:14:43Z","body":"**Stories**\r\nstoriesOf(\"URLField\", module)\r\n  .add(\"default\", () => (\r\n    <ThemeProvider theme={theme}>\r\n      <URLField primaryLabel=\"Your Team Url\" secondaryLabel=\"(letters, numbers and dashes only)\" urlDescription=\".taskvalue.com\" warningText=\"For some weird reason, that didn’t work. Please try again to continue\" validUrl=\"true\" />\r\n    </ThemeProvider>\r\n  ))\r\n\r\n**code**\r\nconst URLField = ({ validUrl , urlDescription, primaryLabel, warningText, secondaryLabel }) => (\r\n  <Wrapper>\r\n    <Label small grey>{primaryLabel}</Label>\r\n    <Label small green>{secondaryLabel}</Label>\r\n    <Urlwrapper>\r\n      <Input validUrl={validUrl} />\r\n      <Text>{urlDescription}</Text>\r\n    </Urlwrapper>\r\n    <Warning>\r\n      <img src={alert} alt=\"\" />\r\n      <Text warning>{warningText}</Text>\r\n    </Warning>\r\n  </Wrapper>\r\n);\r\n\r\n\r\n**CSS**\r\ninput {\r\n    text-align: right;\r\n    display: inline-block;\r\n    padding: 10px 2px;\r\n    background: ${props => props.validUrl === \"true\" ? `url(${valid}) no-repeat left 10px center` : `url(${invalid}) no-repeat left 10px center`};\r\n  }\r\n\r\nAny idea about how to change background"}}
{"actor":{"display_login":"anmol1591"}}