-
Notifications
You must be signed in to change notification settings - Fork 157
/
Copy pathpicker-value-display.R
66 lines (58 loc) · 1.46 KB
/
picker-value-display.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
### Customize the values displayed in the box ----
if (interactive()) {
library(shiny)
library(shinyWidgets)
ui <- fluidPage(
br(),
pickerInput(
inputId = "p1",
label = "Default",
multiple = TRUE,
choices = rownames(mtcars),
selected = rownames(mtcars)[1:5]
),
br(),
pickerInput(
inputId = "p1b",
label = "Default with | separator",
multiple = TRUE,
choices = rownames(mtcars),
selected = rownames(mtcars)[1:5],
options = list(`multiple-separator` = " | ")
),
br(),
pickerInput(
inputId = "p2",
label = "Static",
multiple = TRUE,
choices = rownames(mtcars),
selected = rownames(mtcars)[1:5],
options = list(`selected-text-format`= "static",
title = "Won't change")
),
br(),
pickerInput(
inputId = "p3",
label = "Count",
multiple = TRUE,
choices = rownames(mtcars),
selected = rownames(mtcars)[1:5],
options = list(`selected-text-format`= "count")
),
br(),
pickerInput(
inputId = "p3",
label = "Customize count",
multiple = TRUE,
choices = rownames(mtcars),
selected = rownames(mtcars)[1:5],
options = list(
`selected-text-format`= "count",
`count-selected-text` = "{0} models choosed (on a total of {1})"
)
)
)
server <- function(input, output, session) {
}
shinyApp(ui = ui, server = server)
}