Closed tintinthong closed 5 years ago
Hi @tintinthong , you can't do this by orderInput()
, but you can create vertical bottom using jqui_sortable()
like this:
library(shiny)
library(shinyjqui)
ui <- fluidPage(
jqui_sortable(
div(
id = "foo",
# to create a set of vertical buttons
class = "btn-group-vertical",
div("one", class = "btn btn-primary"),
div("two", class = "btn btn-info"),
div("three", class = "btn btn-success")
),
# connect the button set with another one with id = "bar"
options = list(connectWith = "#bar")
),
verbatimTextOutput("order")
)
server <- function(input, output, session) {
output$order <- renderPrint({
# show order of items
input$foo_order$text
})
}
shinyApp(ui, server)
Thanks @Yang-Tang.
orderInput()
tends to arrange all its blocks in horizontal manner increasing from left to right. I was wondering whether there is a solution to add style that enables all the blocks to stack vertically. So as I submit more blocks it will begin to increase upwards to some maximum limit. Here is an example code that enables me to add blocks. Please help.