如何更改现有表(不是新表)的 DT::datatable 选择?
(updated) 这里有一个简单的例子,当用户点击input$change_selection时,我想更新tbl,让它的selection是multiple
library(shiny)
library(DT)
shinyApp(
ui = fluidPage(actionButton("change_selection", label = "Change selection"), DTOutput('tbl')),
server = function(input, output) {
observeEvent(input$change_selection, {
# code to change the tbl selection from single to multiple
})
output$tbl = renderDT(
iris, selection = list(mode = 'single', target = 'row'), options = list(lengthChange = FALSE)
)
}
)
我正在使用 DT 版本 0.23,如果需要可以升级...
我已经搜索了答案,但还没有找到方法,感谢所有帮助...