{"action":"created","issue":{"url":"https://api.github.com/repos/gcanti/tcomb-form-native/issues/278","repository_url":"https://api.github.com/repos/gcanti/tcomb-form-native","labels_url":"https://api.github.com/repos/gcanti/tcomb-form-native/issues/278/labels{/name}","comments_url":"https://api.github.com/repos/gcanti/tcomb-form-native/issues/278/comments","events_url":"https://api.github.com/repos/gcanti/tcomb-form-native/issues/278/events","html_url":"https://github.com/gcanti/tcomb-form-native/issues/278","id":195184367,"number":278,"title":"Problem with value and nullOption set to false","user":{"login":"damathryx","id":14576761,"avatar_url":"https://avatars.githubusercontent.com/u/14576761?v=3","gravatar_id":"","url":"https://api.github.com/users/damathryx","html_url":"https://github.com/damathryx","followers_url":"https://api.github.com/users/damathryx/followers","following_url":"https://api.github.com/users/damathryx/following{/other_user}","gists_url":"https://api.github.com/users/damathryx/gists{/gist_id}","starred_url":"https://api.github.com/users/damathryx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damathryx/subscriptions","organizations_url":"https://api.github.com/users/damathryx/orgs","repos_url":"https://api.github.com/users/damathryx/repos","events_url":"https://api.github.com/users/damathryx/events{/privacy}","received_events_url":"https://api.github.com/users/damathryx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-12-13T07:51:53Z","updated_at":"2016-12-13T08:30:18Z","closed_at":null,"body":"### Version\r\n\r\nTell us which versions you are using:\r\n\r\n- tcomb-form-native v0.6.1\r\n- react-native v0.38.0\r\n\r\n### Expected behaviour\r\n\r\nTrying to set defaultValue for picker\r\nnullOption is set to false,\r\n\r\n`const locationsForm = {\r\n    auto: 'none',\r\n   fields: {\r\n      locations: {\r\n        nullOption: false\r\n      }\r\n   }\r\n}`\r\n`const locationsValue = {\r\n  locations: 0\r\n}`\r\n`<Form ref=\"location\" type={t.struct({ locations: t.enums.of([_.map(locations, 'address')]) })} value={value} options={locationsForm} />`\r\n### Actual behaviour\r\n\r\nComponentWillMount keeps on triggering\r\ngetting error\r\n![screen shot 2016-12-13 at 3 34 13 pm](https://cloud.githubusercontent.com/assets/14576761/21131663/f32e4892-c14a-11e6-95eb-2f38c0e77042.png)\r\n![screen shot 2016-12-13 at 3 42 31 pm](https://cloud.githubusercontent.com/assets/14576761/21131664/f385afba-c14a-11e6-8644-e475ab6b1292.png)\r\n\r\n\r\n### Stack trace and console log\r\n![screen shot 2016-12-13 at 3 49 16 pm](https://cloud.githubusercontent.com/assets/14576761/21131818/c2da0536-c14b-11e6-8737-de57ed91d159.png)"},"comment":{"url":"https://api.github.com/repos/gcanti/tcomb-form-native/issues/comments/266676874","html_url":"https://github.com/gcanti/tcomb-form-native/issues/278#issuecomment-266676874","issue_url":"https://api.github.com/repos/gcanti/tcomb-form-native/issues/278","id":266676874,"user":{"login":"damathryx","id":14576761,"avatar_url":"https://avatars.githubusercontent.com/u/14576761?v=3","gravatar_id":"","url":"https://api.github.com/users/damathryx","html_url":"https://github.com/damathryx","followers_url":"https://api.github.com/users/damathryx/followers","following_url":"https://api.github.com/users/damathryx/following{/other_user}","gists_url":"https://api.github.com/users/damathryx/gists{/gist_id}","starred_url":"https://api.github.com/users/damathryx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damathryx/subscriptions","organizations_url":"https://api.github.com/users/damathryx/orgs","repos_url":"https://api.github.com/users/damathryx/repos","events_url":"https://api.github.com/users/damathryx/events{/privacy}","received_events_url":"https://api.github.com/users/damathryx/received_events","type":"User","site_admin":false},"created_at":"2016-12-13T08:30:18Z","updated_at":"2016-12-13T08:30:18Z","body":"Fixed it by transforming the array to object using lodash.\r\n`_.zipObject(_.range(locations.length), _.map(locations, 'address'))`\r\nsupplied to\r\n`t.enums`\r\n"}}
{"actor":{"display_login":"damathryx"}}