Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug? Comma inside text in the input choice seems to force reset to deselect the choice. #130

Closed
ghost opened this issue Jun 10, 2017 · 2 comments

Comments

@ghost
Copy link

ghost commented Jun 10, 2017

Hi Dean,

Sorry to bug you again, but I think I ran into a bug? See the code below:

 library(shiny)
 library(shinyjs)

 ui <- fluidPage(
     useShinyjs(),
 	sidebarLayout(
     	sidebarPanel(
	     	checkboxGroupInput("Marital", label = h4("Marital Status"), 
	     		choices = c("Married/Living common-law", 
		     		"Single (not in a relationship)", 
			     	"In relationship, but not living together", 
		     		"Prefer not to answer"), 
		     	selected = c("Married/Living common-law", 
	     			"Single (not in a relationship)", 
			     	"In relationship, but not living together", 
			     	"Prefer not to answer")),
		     actionButton("Reset", "Reset", icon("repeat"), class = "btn-primary")
     	),
     	mainPanel()
     )
 )

 server <- function(input, output) {
     observeEvent(input$Reset, {
     	reset("Marital") 
     })
 }

 shinyApp(ui = ui, server = server)

On my end, when I click on the reset button, the "In relationship, but not living together" option gets deselected. It seems that the issue goes away if you remove the comma inside the text.

@daattali
Copy link
Owner

You indeed found a bug! Without looking into it yet I think I know what's going on. Will fix for next version

Thanks for the report

@daattali
Copy link
Owner

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant