Tree view library (elm-tree-view) for Elm 0.19.
You give the tree of nodes with your data embedded in them, along with with some configuration, and this will take care of some usual UI interaction, such as
Check out
To take it into use
elm-test (with npm)elm-test.Added changelog to README.md, no code changes.
Nodes can have custom HTML rendering with messages and interactions on their own.
To upgradie from using 1.x to 2.0.0, modify 1.x TreeView model declarations like
type alias MyModel =
{
...
, treeViewModel : TreeView.Model MyData MyUid -- elm-tree-view 1.x
}just add a Never to say no custom messages are coming from such a simple tree
view, like
type alias MyModel =
{
...
, treeViewModel : TreeView.Model MyData MyUid Never -- elm-tree-view 2.0.0
}it should build and behave the same (nodes rendered as simple texts).
To go for custom node rendering, use the new types and functions with the
prefix 2, like TreeView.Configuration2,
TreeView.initializeModel2, etc ...
Initial version - nodes are rendered as simple text only.