I am using shinydashboard::sidebarSearchForm
in a Shiny app and would like to place other widgets below it. However, whenever I do, they are pushed out of the sidebarPanel
and into the whitespace below the sidebar. In the code the code below, the materialSwitch
is in sidebarPanel
but renders outside of the sidebar. If you put the materialSwitch
above the sidebarSearchForm
in the sidebarPanel
though, then all the widgets are correctly contained in the sidebar. How do I ensure all these widgets stay in the sidebar? I want the materialSwitch
to be at the bottom of the sidebar. Thanks!
library(shiny)
library(shinydashboard)
library(shinyWidgets)
ui <- tagList(
navbarPage(
theme = "simplex",
"App",
tabPanel("Do something",
sidebarPanel(
sliderInput("slider", "Select Num:"
,min = 1
,max = 10
,sep = ""
,value = c(1, 10)),
pickerInput(
inputId = "picker",
label = "Select:",
selected = "a",
choices = letters,
options = list(
`actions-box` = TRUE,
size = 10,
`selected-text-format` = "count > 3"
),
multiple = TRUE
),
h5(HTML("<b>Search</b>")),
sidebarSearchForm(textId = "searchText",
buttonId = "searchButton",
label = "Include These"
),
h5(HTML("<b>Additional Options:</b>")),
materialSwitch(inputId = "add",
label = "Add?:?",
value = FALSE,
status = "primary")
),
mainPanel(
tabsetPanel(
tabPanel("Tab",
"text"
)
)
)
)
)
)
server <- function(input, output){
}