Composants → bpm.treeview

bpm.treeview

Arbre de noeuds repliables et sélectionnables. Démo : arborescence d'un projet front (src/, components/, hooks/…).

Affichage de données
src/
components/
Button.tsx
Modal.tsx
Navbar.tsx
hooks/
useAuth.ts
useFetch.ts
lib/
api.ts
App.tsx
package.json
tsconfig.json
Python
bpm.treeview(nodes=[{"id": "src", "label": "src/", "children": [{"id": "src-components", "label": "components/", "children": [{"id": "btn", "label": "Button.tsx"}]}]}], on_select=...)
PropTypeDescription
nodesTreeviewNode[]Noeuds { id, label, children?, defaultOpen? }.
selectedIdstring | nullID du noeud sélectionné.
onSelectfunctionCallback (node).