我在这里学习本教程:https://glin.github.io/reactable/articles/examples.html#language-options -我正在尝试制作一个交互式表格。我复制/粘贴了以下代码,并成功地制作了一个交互式表格:
library(reactable)
data <- MASS::Cars93[, c("Manufacturer", "Model", "Type", "Price")]
reactable(
data,
columns = list(
Manufacturer = colDef(
filterable = TRUE,
# Filter by case-sensitive text match
filterMethod = JS("function(rows, columnId, filterValue) {
return rows.filter(function(row) {
return row.values[columnId].indexOf(filterValue) !== -1
})
}")
)
),
defaultPageSize = 5
)

我唯一的问题是,输出的字体/样式与教程不同(我刚刚从教程中抓取了其中一个表的屏幕快照,所有表的字体/样式都是相同的):

谢谢!
https://stackoverflow.com/questions/73697806
复制相似问题