我使用 excelentcrosstalk r package
为我的可反应 htmlwidget 制作过滤器。我在flexdashboard
. 在使用 的groupBy
功能时reactable
,我注意到当我使表格大于它所在的区域时,没有滚动条。
这是一个示例 Tha 有助于使问题变得清晰:
---
title: "Focal Chart (Top)"
output:
flexdashboard::flex_dashboard:
orientation: rows
---
Row {data-height=500}
-------------------------------------
### Chart 1
```{r}
library(crosstalk)
library(reactable)
```
Row {data-height=500}
-------------------------------------
### With crosstalk filtering
```{r}
cars <- MASS::Cars93[1:20, c("Manufacturer", "Model", "Type", "Price")]
data <- SharedData$new(cars)
bscols(
widths = c(3, 9),
list(
filter_checkbox("type", "Type", data, ~Type),
filter_slider("price", "Price", data, ~Price, width = "100%"),
filter_select("mfr", "Manufacturer", data, ~Manufacturer)
),
reactable(data,groupBy = "Manufacturer")
)
```
### Without crosstalk
```{r}
reactable(data,groupBy = "Manufacturer")
```
显示了两个表。当在两个表中展开例如雪佛兰时,在右边的一个(没有串扰过滤的那个)中会出现一个滚动条。然而,在左侧,没有出现滚动条。
如何使我的串扰/可反应滚动?这个问题可以解决吗?提前谢谢了!