Here is the code to a simple Shiny app:
UI
library(shiny)
shareholders.list <- c("Investor A", "Investor B")
tmp.label.select.inv <- "Select one or multiple investors:"
shinyUI(navbarPage(
title = "App",
titlePanel(title = "TITLE"),
tabPanel("Tab 1"
, sidebarLayout(
sidebarPanel(
style = "font-family: 'Segoe UI';
color: #FFFFFF;
background: #014d92;",
selectInput("tmp.IDs",
label = tmp.label.select.inv,
choices = union("All", shareholders.list),
multiple = T,
width = 245
),
actionButton("select.all",
em("Select / Deselect All"),
icon = icon("ok-sign", lib = "glyphicon"),
width = 245,
style="color: #000000;
background: #FFFFFF;
border-color: #000000"
),
width = 2
),
mainPanel(
h5(em("Chosen Investors: "),
br(),strong(textOutput("selected_tmp.IDs"))),
br(),br(),
tableOutput("table_tmp.IDs")
),
position = "left"
)
)
, tabPanel("Download Tables",
mainPanel(
textOutput("odd_even_select.all")
))
, selected = "Tab 1"
)
)
Server
shinyServer(function(input, output) {
output$selected_tmp.IDs <- renderText({
paste0(input$tmp.IDs)
})
})
The problem is that the app keeps displaying "tab-pane active tab-5966-1 " on both tabs.
Any idea how to fix it?
Edit:
I have edited the code and added more details in order to be replicable (note that the unwanted display in the above instance now states "tab-25-25-1" - c.f. image below).
titlePanel
argument innavbarPage
– Gregor de CilliatitlePanel
might not be indicated in thenavbarPage
documentation, but I can assure you it works. – nikoTabs should all be unnamed arguments, but some are named: titlePanel
" when I try to run your code as-is. Usingshiny-1.0.5
– Gregor de Cillia