{"action":"opened","issue":{"url":"https://api.github.com/repos/rstudio/shiny/issues/1938","repository_url":"https://api.github.com/repos/rstudio/shiny","labels_url":"https://api.github.com/repos/rstudio/shiny/issues/1938/labels{/name}","comments_url":"https://api.github.com/repos/rstudio/shiny/issues/1938/comments","events_url":"https://api.github.com/repos/rstudio/shiny/issues/1938/events","html_url":"https://github.com/rstudio/shiny/issues/1938","id":294830765,"number":1938,"title":"Optgroup in selectInput with one element does not show the element and the group correctly","user":{"login":"gurol","id":14318443,"avatar_url":"https://avatars1.githubusercontent.com/u/14318443?v=4","gravatar_id":"","url":"https://api.github.com/users/gurol","html_url":"https://github.com/gurol","followers_url":"https://api.github.com/users/gurol/followers","following_url":"https://api.github.com/users/gurol/following{/other_user}","gists_url":"https://api.github.com/users/gurol/gists{/gist_id}","starred_url":"https://api.github.com/users/gurol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gurol/subscriptions","organizations_url":"https://api.github.com/users/gurol/orgs","repos_url":"https://api.github.com/users/gurol/repos","events_url":"https://api.github.com/users/gurol/events{/privacy}","received_events_url":"https://api.github.com/users/gurol/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-06T16:45:38Z","updated_at":"2018-02-06T16:45:38Z","closed_at":null,"author_association":"NONE","body":"As informed in issue #520 there is optgroup support in the `choices` argument in selectInput()/selectizeInput(). But, when there is only one element in a group it shows the group name as an element and does not show the element.\r\n\r\nYou can seen this on the sample kindly provided by @yihui at https://demo.shinyapps.io/024-optgroup-selectize/.\r\n\r\nAs seen in the code `Middle = c(Iowa = 'IA')`, 'Iowa' is the only element in 'Middle' group. But when you open the `x2` input select, you see 'Middle' as an element (it should be displayed as a group like 'Western' and 'Iowa' is not seen."}}
{"actor":{"display_login":"gurol"}}