Disable "selected option" on renderUI

Hi guys.

I want to disable the "selected option" in my renderUI, but it always appear selected in the first option. My code is there:

output$iAQA <- renderUI({
    #req(input$iData)
    req(input$graudoaco)
    
    df<- filter(df,
            GRAU == input$graudoaco #Condicoes para atender ao filtro
               )

   
    selectInput(
      "aqadoaco",
      label = "Selecione AQA:",
      choices= df$AQA_QT,
      selected = F,   <----------------------------I think is here
      multiple = F
    )
  })

But... when i run my app, the first choise is selected, like this:
renderui

This should be blank.

How can I solve this?

This is an ugly hack but it seems to work.

  output$iAQA <- renderUI({
    df <- data.frame(AQA_QT = LETTERS[1:5], stringsAsFactors = FALSE)
    selectInput(
      "aqadoaco",
      label = "Selecione AQA:",
      choices= c("", df$AQA_QT),
      multiple = F
    )
  })
2 Likes

I don't know how... but it worked! Haha.

Really thanks!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.