{"action":"closed","issue":{"url":"https://api.github.com/repos/react-tools/react-form/issues/293","repository_url":"https://api.github.com/repos/react-tools/react-form","labels_url":"https://api.github.com/repos/react-tools/react-form/issues/293/labels{/name}","comments_url":"https://api.github.com/repos/react-tools/react-form/issues/293/comments","events_url":"https://api.github.com/repos/react-tools/react-form/issues/293/events","html_url":"https://github.com/react-tools/react-form/issues/293","id":309991687,"number":293,"title":"Strange behavior with defaultValues","user":{"login":"shauravg","id":810466,"avatar_url":"https://avatars2.githubusercontent.com/u/810466?v=4","gravatar_id":"","url":"https://api.github.com/users/shauravg","html_url":"https://github.com/shauravg","followers_url":"https://api.github.com/users/shauravg/followers","following_url":"https://api.github.com/users/shauravg/following{/other_user}","gists_url":"https://api.github.com/users/shauravg/gists{/gist_id}","starred_url":"https://api.github.com/users/shauravg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shauravg/subscriptions","organizations_url":"https://api.github.com/users/shauravg/orgs","repos_url":"https://api.github.com/users/shauravg/repos","events_url":"https://api.github.com/users/shauravg/events{/privacy}","received_events_url":"https://api.github.com/users/shauravg/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-03-30T06:58:23Z","updated_at":"2018-04-06T02:03:18Z","closed_at":"2018-04-06T02:03:18Z","author_association":"NONE","body":"I am using version 3.4.4\r\n\r\nIn my parent component, I am creating a defaultValues object in the constructor. This object is either empty if the user is not logged in or has values if the user is logged in. I tried both with having this object be part of the component state and as a class variable. The values needed to build the defaultValues object are being read from a cookie so its not an async function. In my render function, I have:\r\n\r\n`<Form \r\n\t\t\t\t\tcomponent={ContactFormFields} \r\n\t\t\t\t\tonSubmit={this.handleSubmit} \r\n\t\t\t\t\tvalidate={this.handleFormValidation}\r\n\t\t\t\t\tdefaultValues={this.defaultValues}\r\n\t\t\t\t/> `\r\n\r\nWhen the page first loads, the default values do not show up. When I click on one of the text input fields that does have a default value assigned and take the focus away from it, then the default value appears. Any thoughts on whether I am misusing the defaultValues prop or there is something wrong?"}}
{"actor":{"display_login":"shauravg"}}