Super simple tree UI, using nested repeating panels, with expanding and contracting sub-lists

Tree widgets seem like a common requirement, and they can be done with Anvil Tabulator, but it’s very easy to accomplish with native Anvil using nested repeating lists. I haven’t seen this solution elsewhere, so thought it may be generally useful for others:

https://anvil.works/build#clone:IORQH37FJILV24MW=ODLH4LBC7AJGI7W6OSQ3ON7F

I’ll add this to the tutorial at https://pythonanvil.com

3 Likes

Very nice :slight_smile: Thank you!

1 Like

Here’s a version that draws values from linked data tables, and uses arrow icons that flip up and down to visually indicate branches of the tree opening and closing.:

https://anvil.works/build#clone:MULVRCU5I4C3JCDA=HSZTTCP7MZRA24PYMTE6BGRV

1 Like

My girlfriend is not always happy I consider that toying with things like this, constitutes a fun Saturday night :sweat_smile:

3 Likes

Legendary… Our significant others would get along well.

It’s Friday night! …so I updated the Tree to write back to the database!! … Whoop!!! :fireworks:

2 Likes