You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: NEWS.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -249,7 +249,7 @@ or redirect at the top of the page
249
249
## Breaking changes
250
250
- change argument name in `dropdownItem()` (`boxPlus()`): "target" is replaced by "url".
251
251
- Widely simplify the `rightSidebar()` function: remove `rightSidebarTabList()`, `rightSidebarTabItem()` and
252
-
`rightSidebarPanel()` from the user interface. See [here](https://rinterface.github.io/shinydashboardPlus/articles/rightSidebar.html) to discover how to set up
252
+
`rightSidebarPanel()` from the user interface. See [here](https://shinydashboardplus.rinterface.com/articles/controlbar#controlbar) to discover how to set up
253
253
a new `rightSidebar()`
254
254
## Major changes
255
255
- add a "width" argument to the `rightSidebar()` (set to 230 pixels by default) to
Copy file name to clipboardExpand all lines: vignettes/improved-boxes.Rmd
+32-35Lines changed: 32 additions & 35 deletions
Original file line number
Diff line number
Diff line change
@@ -56,37 +56,37 @@ server <- function(input, output, session) {
56
56
req(!input$mybox$collapsed)
57
57
plot(rnorm(200))
58
58
})
59
-
59
+
60
60
output$box_state <- renderText({
61
61
state <- if (input$mybox$collapsed) "collapsed" else "uncollapsed"
62
62
paste("My box is", state)
63
63
})
64
-
64
+
65
65
observeEvent(input$toggle_box, {
66
66
updateBox("mybox", action = "toggle")
67
67
})
68
-
68
+
69
69
observeEvent(input$remove_box, {
70
70
updateBox("mybox", action = "remove")
71
71
})
72
-
72
+
73
73
observeEvent(input$restore_box, {
74
74
updateBox("mybox", action = "restore")
75
75
})
76
-
76
+
77
77
observeEvent(input$update_box, {
78
78
updateBox(
79
-
"mybox",
80
-
action = "update",
79
+
"mybox",
80
+
action = "update",
81
81
options = list(
82
82
title = h2("New title", dashboardLabel(1, status = "primary")),
83
-
status = "danger",
83
+
status = "danger",
84
84
solidHeader = TRUE,
85
85
width = 4
86
86
)
87
87
)
88
88
})
89
-
89
+
90
90
observeEvent(input$mybox$visible, {
91
91
collapsed <- if (input$mybox$collapsed) "collapsed" else "uncollapsed"
92
92
visible <- if (input$mybox$visible) "visible" else "hidden"
@@ -107,7 +107,7 @@ We call the `updateBox()` function, specifying the action to accomplish:
107
107
108
108
Knowing the state of a box significantly opens new possibilities within the application, thereby increasing interactivity. Additionally, the toggle animation has been speed up (from 0.5s to 0.1s) so as to reduce the latency.
109
109
110
-
If you want to know more about the underlying mechanisms, have a look at the box widget [documentation](https://adminlte.io/docs/2.4/js-box-widget).
110
+
If you want to know more about the underlying mechanisms, have a look at the box widget [documentation](https://github.com/ColorlibHQ/AdminLTE/tree/86990d5b48f5b9d747ee14d67df7bb200ffc6f85/documentation).
111
111
112
112
<divclass="marvel-device ipad black">
113
113
<divclass="camera"></div>
@@ -140,21 +140,21 @@ shinyApp(
140
140
header = dashboardHeader(),
141
141
body = dashboardBody(
142
142
box(
143
-
title = "Update box sidebar",
144
-
closable = TRUE,
143
+
title = "Update box sidebar",
144
+
closable = TRUE,
145
145
width = 12,
146
146
height = "500px",
147
-
solidHeader = FALSE,
147
+
solidHeader = FALSE,
148
148
collapsible = TRUE,
149
149
actionButton("update", "Toggle card sidebar"),
150
150
sidebar = boxSidebar(
151
151
id = "mycardsidebar",
152
152
width = 25,
153
153
sliderInput(
154
-
"obs",
154
+
"obs",
155
155
"Number of observations:",
156
-
min = 0,
157
-
max = 1000,
156
+
min = 0,
157
+
max = 1000,
158
158
value = 500
159
159
)
160
160
),
@@ -165,15 +165,14 @@ shinyApp(
165
165
),
166
166
server = function(input, output, session) {
167
167
observe(print(input$mycardsidebar))
168
-
168
+
169
169
output$distPlot <- renderPlot({
170
170
hist(rnorm(input$obs))
171
171
})
172
-
172
+
173
173
observeEvent(input$update, {
174
174
updateBoxSidebar("mycardsidebar")
175
175
})
176
-
177
176
}
178
177
)
179
178
```
@@ -201,11 +200,11 @@ shinyApp(
201
200
dashboardSidebar(),
202
201
dashboardBody(
203
202
box(
204
-
title = "Closable Box with dropdown",
205
-
closable = TRUE,
203
+
title = "Closable Box with dropdown",
204
+
closable = TRUE,
206
205
width = 12,
207
-
status = "warning",
208
-
solidHeader = FALSE,
206
+
status = "warning",
207
+
solidHeader = FALSE,
209
208
collapsible = TRUE,
210
209
dropdownMenu = boxDropdown(
211
210
boxDropdownItem("Click me", id = "dropdownItem", icon = icon("heart")),
@@ -284,14 +283,14 @@ shinyApp(
284
283
navPills(
285
284
id = "pillItem",
286
285
navPillsItem(
287
-
left = "Item 1",
286
+
left = "Item 1",
288
287
color = "green",
289
288
right = 10
290
289
),
291
290
navPillsItem(
292
-
left = "Item 2",
291
+
left = "Item 2",
293
292
color = "red",
294
-
icon = icon("angle-down"),
293
+
icon = icon("angle-down"),
295
294
right = "10%"
296
295
)
297
296
),
@@ -301,18 +300,17 @@ shinyApp(
301
300
title = "userBox"
302
301
),
303
302
server = function(input, output) {
304
-
305
303
observeEvent(input$pillItem, {
306
304
if (input$pillItem == 2) {
307
305
showModal(
308
306
modalDialog("A modal")
309
307
)
310
308
}
311
309
})
312
-
310
+
313
311
observeEvent(input$pillItem, {
314
312
showNotification(
315
-
sprintf("You clicked on pill N° %s", input$pillItem),
313
+
sprintf("You clicked on pill N° %s", input$pillItem),
0 commit comments