Closed accliu closed 3 years ago
In dev version this should works fine:
library(shiny)
library(esquisse)
ui <- fluidPage(
tags$h2("Demo dragulaInput"),
tags$br(),
fluidRow(
column(
width = 3,
dragulaInput(
inputId = "dad1",
label = "Default:",
sourceLabel = "Source",
targetsLabels = c("Target 1", "Target 2"),
choices = month.name,
width = "100%"
),
verbatimTextOutput(outputId = "result1")
)
)
)
server <- function(input, output, session) {
output$result1 <- renderPrint(str(input$dad1))
}
if (interactive())
shinyApp(ui = ui, server = server)
Result:
Victor
I'm learning this amazing tool. In running the demo: if (interactive()) {
library("shiny") library("esquisse")
ui <- fluidPage( tags$h2("Demo dragulaInput"), tags$br(), dragulaInput( inputId = "dad", sourceLabel = "Source", targetsLabels = c("Target 1", "Target 2"), choices = names(iris), width = "400px" ), verbatimTextOutput(outputId = "result") )
server <- function(input, output, session) {
output$result <- renderPrint(str(input$dad))
}
shinyApp(ui = ui, server = server)
}
If several items are dragged to the target box: , we can only see just a few of the variable names (items). I can set box style overflow: auto to scroll a bar to see the other variables, but this is not very handy. display: grid; may help, but the appearance is very different from the parent input box. Is there a way to make the items on multiple lines? Can we customize the styles of the parent box and the target boxes separately? Is there a way to change the location of the target labels c("Target 1", "Target 2")? Really appreciate your help.