Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to add vertical scroll on Inputs {.sidebar} #27

Closed
bridgeportbyron opened this issue May 22, 2016 · 5 comments
Closed

Unable to add vertical scroll on Inputs {.sidebar} #27

bridgeportbyron opened this issue May 22, 2016 · 5 comments

Comments

@bridgeportbyron
Copy link

bridgeportbyron commented May 22, 2016

I am designing a Flexdashboard UI with 17 user inputs, most of them are textbox one is a checkbox and an actionbutton. I can only see 10 textbox when I run the script I cannot see the rest and i cannot find any documentation that describes how to add vertical scroll on Input {.sidebar}. Here's my code below.


---
title: "Untitled"
output: 
  flexdashboard::flex_dashboard:
    orientation: columns
    vertical_layout: scroll

---

    ```{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")


@jjallaire
Copy link
Member

Fixed via: 440cab3

You can use a version with the fix by installing from GitHub:

devtools::install_github("rstudio/flexdsahboard")

Alternatively, you could add this snippet of CSS to your dashboard:

<style type="text/css"> .sidebar { overflow: auto; } </style>

@MahreenAthar
Copy link

@jjallaire Hi I'm very new to this. Can you tell how i can add this snippet to my dashboard:
<style type="text/css"> .sidebar { overflow: auto; } </style>
Do i have to make some kind of separate css style sheet?

@jjallaire
Copy link
Member

The latest version from CRAN has this fix so that's one option.

If you need to include the code directly you can just add that code to the Rmd (no separate CSS file required)

@jjallaire
Copy link
Member

I guess you prefer to run the 2 year old version of flexdashboard? (the newer version has this code in it already).

I also don't see a sidebar in your dashboard so I don't know that this fix actually has anything to do with your use case.

@MahreenAthar
Copy link

Oh okay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants