【问题标题】:ShinyTree with default selected value具有默认选定值的 ShinyTree
【发布时间】:2019-03-20 10:43:57
【问题描述】:

我正在尝试实现具有默认选定值的 shinyTree。有人知道这是否可能吗?

我在documentationthe package 附带的示例中找不到任何内容。

感谢大家的帮助。

【问题讨论】:

标签: shiny default-value shinytree


【解决方案1】:

将所需节点的“stselected”属性设置为 TRUE

例子:

output$tree <- renderTree({
   sss=list('Nodes' = list('Node1' = '1', 'Node2' = '2'))
   attr(sss[[1]][['Node1']],"stselected")=TRUE # <---
   attr(sss[[1]],"stopened")=TRUE
   sss
})

【讨论】:

    猜你喜欢
    • 2014-03-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-03-21
    • 2021-02-20
    • 1970-01-01
    相关资源
    最近更新 更多