# NOT RUN {
## - example-rank-list ------------------------------------------------
if (interactive()) {
rank_list(
text = "You can drag, drop and re-order these items:",
labels = c("one", "two", "three", "four", "five"),
input_id = "example_2"
)
}
## - example-rank-list-multidrag ------------------------------------------
if (interactive()) {
rank_list(
text = "You can select multiple items and drag as a group:",
labels = c("one", "two", "three", "four", "five"),
input_id = "example_2",
options = sortable_options(
multiDrag = TRUE
)
)
}
## - example-rank-list-swap -----------------------------------------------
if (interactive()) {
rank_list(
text = "You can re-order these items, and notice the swapping behaviour:",
labels = c("one", "two", "three", "four", "five"),
input_id = "example_2",
options = sortable_options(
swap = TRUE
)
)
}
## Example of a shiny app
if (interactive()) {
app <- system.file("shiny-examples/rank_list/app.R", package = "sortable")
shiny::runApp(app)
}
# }
Run the code above in your browser using DataLab