Bri*_*ker 3 r r-markdown shinydashboard flexdashboard
我正在使用Flexdashboard设计一个UI,一些textinput框超出常规浏览器窗口,我vertical_layout: scroll在代码中添加了一行,但我猜这还不够?所以我的问题是如何启用垂直滚动功能,如下图所示.?非常感谢任何提示或指示.
这是我下面的代码
---
title: "Untitled"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: scroll
smooth_scroll: true
runtime: shiny
---
```{r setup, include=FALSE}
library(flexdashboard)
```
Inputs {.sidebar}
-----------------------------------------------------------------------
```{r}
library(shiny)
library(shinyjs)
shinyjs::useShinyjs()
#tags$hr(),
shinyjs::disabled(textInput("id", "Id", "0"))
textInput("X1", "X1", "")
textInput("X2", "X2", "")
textInput("X3", "X3", "")
textInput("X4", "X4", "")
textInput("X5", "X5", "")
textInput("X6", "X6", "")
textInput("X7", "X7", "")
textInput("X8", "X8", "")
textInput("X9", "X9", "")
textInput("X10", "X10", "")
textInput("X11", "X11", "")
textInput("X12", "X12", "")
textInput("X13", "X13", "")
textInput("X14", "X14", "")
textInput("X15", "X15", "")
textInput("X16", "X16", "")
checkboxInput("X17", "X17", FALSE)
#action buttons
actionButton("submit", "Submit Changes")
```
Run Code Online (Sandbox Code Playgroud)
小智 12
此问题已在此处解决:https://github.com/rstudio/flexdashboard/issues/27
您可以通过从GitHub安装最新版本来使用具有此修复程序的版本:
devtools::install_github("rstudio/flexdashboard")
Run Code Online (Sandbox Code Playgroud)
或者,您可以将此CSS片段添加到信息中心:
<style type="text/css"> .sidebar { overflow: auto; } </style>
Run Code Online (Sandbox Code Playgroud)