{"action":"created","issue":{"url":"https://api.github.com/repos/vazco/uniforms/issues/119","repository_url":"https://api.github.com/repos/vazco/uniforms","labels_url":"https://api.github.com/repos/vazco/uniforms/issues/119/labels{/name}","comments_url":"https://api.github.com/repos/vazco/uniforms/issues/119/comments","events_url":"https://api.github.com/repos/vazco/uniforms/issues/119/events","html_url":"https://github.com/vazco/uniforms/issues/119","id":185653740,"number":119,"title":"Cannot unselect a SelectField that is optional","user":{"login":"todda00","id":8363924,"avatar_url":"https://avatars.githubusercontent.com/u/8363924?v=3","gravatar_id":"","url":"https://api.github.com/users/todda00","html_url":"https://github.com/todda00","followers_url":"https://api.github.com/users/todda00/followers","following_url":"https://api.github.com/users/todda00/following{/other_user}","gists_url":"https://api.github.com/users/todda00/gists{/gist_id}","starred_url":"https://api.github.com/users/todda00/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/todda00/subscriptions","organizations_url":"https://api.github.com/users/todda00/orgs","repos_url":"https://api.github.com/users/todda00/repos","events_url":"https://api.github.com/users/todda00/events{/privacy}","received_events_url":"https://api.github.com/users/todda00/received_events","type":"User","site_admin":false},"labels":[{"id":373826914,"url":"https://api.github.com/repos/vazco/uniforms/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":{"login":"radekmie","id":1379064,"avatar_url":"https://avatars.githubusercontent.com/u/1379064?v=3","gravatar_id":"","url":"https://api.github.com/users/radekmie","html_url":"https://github.com/radekmie","followers_url":"https://api.github.com/users/radekmie/followers","following_url":"https://api.github.com/users/radekmie/following{/other_user}","gists_url":"https://api.github.com/users/radekmie/gists{/gist_id}","starred_url":"https://api.github.com/users/radekmie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radekmie/subscriptions","organizations_url":"https://api.github.com/users/radekmie/orgs","repos_url":"https://api.github.com/users/radekmie/repos","events_url":"https://api.github.com/users/radekmie/events{/privacy}","received_events_url":"https://api.github.com/users/radekmie/received_events","type":"User","site_admin":false},"assignees":[{"login":"radekmie","id":1379064,"avatar_url":"https://avatars.githubusercontent.com/u/1379064?v=3","gravatar_id":"","url":"https://api.github.com/users/radekmie","html_url":"https://github.com/radekmie","followers_url":"https://api.github.com/users/radekmie/followers","following_url":"https://api.github.com/users/radekmie/following{/other_user}","gists_url":"https://api.github.com/users/radekmie/gists{/gist_id}","starred_url":"https://api.github.com/users/radekmie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radekmie/subscriptions","organizations_url":"https://api.github.com/users/radekmie/orgs","repos_url":"https://api.github.com/users/radekmie/repos","events_url":"https://api.github.com/users/radekmie/events{/privacy}","received_events_url":"https://api.github.com/users/radekmie/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2016-10-27T12:25:38Z","updated_at":"2016-10-27T19:32:42Z","closed_at":null,"body":"Expected behavior: When a field in the schema is optional, the SelectField will have an option to de-select the selection.\r\n\r\nPlaceholder works only until the user clicks on the select box, then they are presented with all the options, but no way to remove their selection.\r\n\r\nExample schema:\r\n```\r\n...\r\nminEnrollment: {\r\n    type: Date,\r\n    optional: true,\r\n    label: 'Earliest enrollment term',\r\n  },\r\n...\r\n```\r\n\r\nExample SelectField:\r\n```\r\n<SelectField\r\n  name=\"minEnrollment\"\r\n  allowedValues={enrollmentRangeOptions()}\r\n  transform={enrollmentRangeDisplay}\r\n  placeholder=\"--Select Enrollment Term--\"\r\n/>\r\n```\r\n\r\nHTML Output (nothing selected yet):\r\n![nothing-selected](https://cloud.githubusercontent.com/assets/8363924/19766948/78aba354-9c1e-11e6-8b5f-0ca2936d8404.png)\r\n\r\nInitial click into dropdown:\r\n![fullscreen_10_27_16__8_19_am](https://cloud.githubusercontent.com/assets/8363924/19766972/91a45914-9c1e-11e6-88b9-680a171b4577.png)\r\n\r\nHTML Code:\r\n![html](https://cloud.githubusercontent.com/assets/8363924/19766989/aceda23e-9c1e-11e6-8211-27229a1e217e.png)\r\n\r\nIt seems the disabled and hidden need to be removed from the placeholder, although I would think this would have more implications in other use cases. I found #78 referencing the same issue as well. \r\n"},"comment":{"url":"https://api.github.com/repos/vazco/uniforms/issues/comments/256745848","html_url":"https://github.com/vazco/uniforms/issues/119#issuecomment-256745848","issue_url":"https://api.github.com/repos/vazco/uniforms/issues/119","id":256745848,"user":{"login":"radekmie","id":1379064,"avatar_url":"https://avatars.githubusercontent.com/u/1379064?v=3","gravatar_id":"","url":"https://api.github.com/users/radekmie","html_url":"https://github.com/radekmie","followers_url":"https://api.github.com/users/radekmie/followers","following_url":"https://api.github.com/users/radekmie/following{/other_user}","gists_url":"https://api.github.com/users/radekmie/gists{/gist_id}","starred_url":"https://api.github.com/users/radekmie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radekmie/subscriptions","organizations_url":"https://api.github.com/users/radekmie/orgs","repos_url":"https://api.github.com/users/radekmie/repos","events_url":"https://api.github.com/users/radekmie/events{/privacy}","received_events_url":"https://api.github.com/users/radekmie/received_events","type":"User","site_admin":false},"created_at":"2016-10-27T19:32:42Z","updated_at":"2016-10-27T19:32:42Z","body":"Also changing to an `<option />` with empty value _(the unselected one)_ could remove it from the model, but this might be tricky, when it will be nested inside an array and an object...\r\n\r\nAny thoughts, @todda00?"}}
{"actor":{"display_login":"radekmie"}}