A tree widget from jsTree

I wanted to give an update on this.

with Philips help, I got it into panel 1. And I have made some major improvements on it over the summer with more time. It is also now on PyPI and Conda (with hopes of someday soonish of going into Panel). It has an abstract BaseTree class and two concrete implementations. a general Tree class that lets you use either static data (data you don’t change), or you can lazy load more data by passing in a callable that will load new node children as you open more nodes. It also has a number of parameters you can adjust from the GUI. Then there is also the FileTree that works as a server side file browser, similar to the FileSelector in Panel. It supports multiselect and single select. Lazy loads the nodes as you open them, and if you directly set the current value to something not loaded (a great-great-great grandchild of the loaded nodes), it will recursively load the parents until that node is loaded and selected. There are many more things to come before I think it would be ready for a PR to panel, but I would love for people to give me their thoughts! The docs right now are only what is in the parameters, so pretty still early.

This is the file tree
file-tree

This is a basic Tree that swaps out the data with a panel button hooked to a callback
simple_tree

This is a tree that produces random nodes based on a custom callable passed in at init
random-tree

All 3 are in the repo with instructions in the README on how to run

4 Likes