Versions in this module Expand all Collapse all v0 v0.1.0 Jul 19, 2026 Changes in this version + const MaxTreeDepth + const MaxTreeNodes + const MaxTreeRenderBytes + var ErrInvalidSelection = errors.New("jawstree: invalid selection") + var ErrInvalidTree = errors.New("jawstree: invalid tree") + var ErrPathRejected = errors.New("jawstree: refusing client selection write") + func Setup(jw *jaws.Jaws, handleFn jaws.HandleFunc, prefix string) (urls []*url.URL, err error) + type Node struct + Children []*Node + Disabled bool + ID string + Name string + Parent *Node + Selected bool + func Root(r *os.Root, filterFn func(dirpath string, ent fs.DirEntry) (include bool)) (rootnode *Node, err error) + func (node *Node) GetNames() (names []string) + func (node *Node) GetSelected() (nameLists [][]string) + func (node *Node) HasNames(names []string) (yes bool) + func (node *Node) Walk(jsPath string, fn func(jsPath string, node *Node)) + func (node Node) MarshalJSON() (b []byte, err error) + type Option int + const CascadeSelectChildren + const CheckboxSelectionEnabled + const InitiallyExpanded + const MultiSelectEnabled + const NodeSelectionDisabled + const SearchEnabled + const ShowExpandCollapseAllButtons + const ShowInvertSelectionButton + const ShowSelectAllButton + type Tree struct + func New(l sync.Locker, root *Node, options ...Option) (t *Tree, err error) + func (t *Tree) Dirty(jw *jaws.Jaws) + func (t *Tree) GetSelected() (nameLists [][]string) + func (t *Tree) JawsInput(elem *jaws.Element, value string) error + func (t *Tree) JawsRender(elem *jaws.Element, w io.Writer, params []any) (err error) + func (t *Tree) JawsUpdate(elem *jaws.Element) + func (t *Tree) SetSelected(nameLists [][]string) (err error) + func (t *Tree) Walk(fn func(jsPath string, node *Node))