I am trying to get a vertical scroll but this isn't working, can anybody explain why? I would also like to default to show 20 rows at once.
Thanks
title: "Untitled"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
---
```{r setup, include=FALSE}
library(flexdashboard)
library(DT)
```
Column {data-width=650}
-----------------------------------------------------------------------
### Chart A
```{r}
datatable(cars ,options = list(c(bPaginate = F, scrollY=T)), filter = 'top')
```
The scrollY
parameter isn't a boolean. You need to specify the fixed height of your table as per the datatables documentation.
---
title: "Untitled"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
---
```{r setup, include=FALSE}
library(flexdashboard)
library(DT)
```
Column {data-width=650}
-----------------------------------------------------------------------
### Chart A
```{r}
DT::datatable(cars, filter = "top",
options = list(pageLength = 20, scrollY = "200px"))
```
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With