collapsibleTree icon indicating copy to clipboard operation
collapsibleTree copied to clipboard

[feature request] Allow map to be partially un-collapsed by default

Open rlderi opened this issue 3 years ago • 0 comments

There are many cases where it would be very useful to have the collapsibleTree expanded to a particular node by default, rather than either completely collapsed or completely expanded. For an example implementation, the expandTo column below would tell the map to render with the path from root to Ida expanded, and the rest of the map collapsed.

org <- data.frame(
  Manager = c(
    NA, "Ana", "Ana", "Bill", "Bill", "Bill", "Claudette", "Claudette", "Danny",
    "Fred", "Fred", "Grace", "Larry", "Larry", "Nicholas", "Nicholas"
  ),
  Employee = c(
    "Ana", "Bill", "Larry", "Claudette", "Danny", "Erika", "Fred", "Grace",
    "Henri", "Ida", "Joaquin", "Kate", "Mindy", "Nicholas", "Odette", "Peter"
  ),
  Title = c(
    "President", "VP Operations", "VP Finance", "Director", "Director", "Scientist",
    "Manager", "Manager", "Jr Scientist", "Operator", "Operator", "Associate",
     "Analyst", "Director", "Accountant", "Accountant"
  ),
  expandTo = c(rep(FALSE, 9), TRUE, rep(FALSE, 6))
)

rlderi avatar Mar 09 '22 18:03 rlderi