원본 데이터 세트가 매우 커서 홍채 데이터 세트를 사용하여 문제를 재현했습니다. 꽃 설명이 담긴 'new_var'열을 추가했습니다. 내가 가진 문제는 드롭 다운 메뉴에서 여러 입력 (> 3)을 선택하면 드롭 다운 메뉴에서 나머지 값을 표시하도록 세로 막대 길이가 조정되지 않습니다.빛나는 대시 보드 사이드 바 길이를 늘리십시오.
사이드 바 길이를 늘려 보았지만 작동하지 않습니다. fluidPage로 대시 보드 사이드 바를 감싸려고했는데 작동하지 않습니다.
사이드 바의 길이를 동적으로 조정하여 모든 값을 보거나 세로 스크롤 막대를 제공하도록 스크롤 할 수 있다면 정말 찾고 있습니다. 감사합니다
library(datasets)
library(shiny)
library(shinydashboard)
library(DT)
data(iris)
x <- c("Small flowers","Flowers (or heads) borne singly on isolated stems or arising individually from leaf axils. Not part of a larger group.", "A simple, indeterminate inflorescence consisting of stalked flowers attached to a central stem and forming a more or less elongated cluster. The stalk of a flower is termed a pedicle and pedicled flowers are implied by the term raceme when used alone in the specific sense. ", "An indeterminate inflorescence consisting of stalkless flowers attached to a central stem, generally forming a highly elongated cluster. A raceme of stalkless flowers. ", "An indeterminate inflorescence forming a convex or flat-topped cluster, essentially a contracted raceme. Typically flowers arise from a central axis on stalks (pedicles) of different lengths that bring them all to near the same height. The term is also applied to racemes of similar shape with branching pedicles. The outermost flowers generally open first. ")
iris$new_var <- rep(x, each = 30)
ui <-
dashboardPage(
dashboardHeader(title = strong("DATA LOADER"),titleWidth = 240),
dashboardSidebar(
sidebarMenu(
selectizeInput("newvar", "Choose type of flower:", choices = sort(unique(iris$new_var)), multiple = TRUE)
)
),
dashboardBody(
fluidRow(
dataTableOutput("df"),
br()
)))
server <- function(input, output){
output$df <- renderDataTable(reactive({
iris[iris$new_var %in% input$newvar, ]
})())
}
shinyApp(ui, server)
감사합니다 ... 내 문제를 해결 – user1946217