Skip to content

Commit 742a4cc

Browse files
committed
r side (see previous commit)
1 parent 3ba387c commit 742a4cc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

R/dashboardSidebar.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,16 +120,16 @@ dashboardSidebar <- function(..., disable = FALSE, width = NULL, collapsed = FAL
120120
# If we're restoring a bookmarked app, this holds the value of whether or not the
121121
# sidebar was collapsed. If this is not the case, the default is whatever the user
122122
# specified in the `collapsed` argument.
123-
dataValue <- shiny::restoreInput(id = "sidebarCollapsed",
124-
default = if (collapsed) "true" else "false")
123+
dataValue <- shiny::restoreInput(id = "sidebarCollapsed", default = collapsed)
124+
dataValueString <- if (dataValue) "true" else "false"
125125

126126
# The expanded/collapsed state of the sidebar is actually set by adding a
127127
# class to the body (not to the sidebar). However, it makes sense for the
128128
# `collapsed` argument to belong in this function. So this information is
129129
# just passed through (as the `data-collapsed` attribute) to the
130130
# `dashboardPage()` function
131131
tags$aside(
132-
class = "main-sidebar", `data-collapsed` = dataValue, custom_css,
132+
class = "main-sidebar", `data-collapsed` = dataValueString, custom_css,
133133
tags$section(
134134
class = "sidebar",
135135
`data-disable` = if (disable) 1 else NULL,

0 commit comments

Comments
 (0)