Closed flash0926 closed 1 week ago
Use selectable to make_tree can handle this.
lapply(tree, function(node) { if (!is.null(node$nodes)) { node$selectable <- FALSE node$nodes <- modify_tree(node$nodes) if(length(node$nodes) == 0){ node$selectable <- TRUE } } else { node$selectable <- TRUE } node })
I have data with different levels. The sample code is as shown below Some data is at level 2, which is the last level I only want to select the data at the last level. How should I modify the code in this case? As shown in the sample code below, I only want to select the level title.
![image](https://github.com/dreamRs/shinytreeview/assets/13973391/770b4310-bb73-41d8-b66d-1583714b1c45)