title: reset R shiny actionButton to use it more than once
body: <p>Does someone know how to make actionButton (R shiny) reset to initial value in order to use it more than once?</p>
  
  <p><strong>Please find below a reproductible example</strong>: </p>
  
  <p>In this example, I would like to change the chart color by selecting the corresponding button: my issue is that it cannot reload the chart after one iteration.</p>
  
  <pre><code>library(shiny)
  
  ui &lt;- fluidPage(
  
    actionButton(inputId = "button1",label = "Select red"),
    actionButton(inputId = "button2",label = "Select blue"),
    plotOutput("distPlot")
  
  )
  
  
  server &lt;- function(input, output) {
  
     output$distPlot &lt;- renderPlot({
        x    &lt;- faithful[, 2] 
        bins &lt;- seq(min(x), max(x))
  
        my_color &lt;- "green"
        if (input$button1){my_color &lt;- "red"}
        if (input$button2){my_color &lt;- "blue"}
  
        hist(x, breaks = bins, col = my_color)
     })
  }
  
  shinyApp(ui = ui, server = server)
  </code></pre>
  
  <p>Thank you in advance</p>