-
Notifications
You must be signed in to change notification settings - Fork 1
/
HidePanel.R
37 lines (30 loc) · 1.04 KB
/
HidePanel.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
library(shiny)
library(shinyjs)
ui <- fluidPage(
useShinyjs(),
pageWithSidebar(headerPanel(""),
div(id ="inSaveSideBar",sidebarPanel(
width = 3,
actionButton("inSave","Save"),
p(""),
checkboxGroupInput('inDocuments', 'Files:',
choices=c(""))
)),
mainPanel(actionLink("inExplorer","Files"),
actionButton("showSidebar", "Show sidebar"),
actionButton("hideSidebar", "Hide sidebar")
)
)
)
server <-function(input, output, session) {
observeEvent(input$showSidebar, {
shinyjs::show(id = "inSaveSideBar")
})
observeEvent(input$hideSidebar, {
shinyjs::hide(id = "inSaveSideBar")
})
observeEvent(input$inExplorer, {
shinyjs::hide(id = "inSaveSideBar")
})
}
shinyApp(ui, server)