【发布时间】:2018-01-08 04:57:48
【问题描述】:
如何在 tabPanel 中创建可滚动的表格列表?
基于Outputing N tables in shiny, where N depends on the data,我尝试了以下
服务器.R
userHist <- list(
data.frame(X=1:10,Y=11:20),
data.frame(X=1:10,Y=11:20))
output$groupHistory <- renderUI({
userHistList <- lapply( seq(userHist), function(i){
hist_i <- userHist[[i]]
TabName <- paste0("User", i)
fluidRow( column(10,
h2(TabName),
hr(),
column(3, renderTable(hist_i, rownames=TRUE) )
) )
} )
userHistList
})
ui.R
tabsetPanel(id="tabsetpanel",
tabPanel(h1("Group History"),
style="overflow-y:scroll;",
uiOutput("groupHistory")
)
)
当列表变长时会显示一个主 firefox 滚动条,但有第二个用于不垂直滚动的表格的滚动条。理想情况下,我也会消除水平滚动。
【问题讨论】: