Skip to content

Commit

Permalink
fix and enhance trees
Browse files Browse the repository at this point in the history
  • Loading branch information
hhaensel committed Jul 8, 2022
1 parent 993ea93 commit 78b4d8e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/StippleUI.jl
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ include("Timelines.jl")
include("Toggles.jl")
include("Toolbars.jl")
include("Tooltips.jl")
include("Trees.jl")
include("Uploaders.jl")
include("Videos.jl")

Expand Down Expand Up @@ -152,6 +153,7 @@ export quasar, quasar_pure, vue, vue_pure, xelem, xelem_pure, @click, csscolors
@reexport using .Toggles
@reexport using .Toolbars
@reexport using .Tooltips
@reexport using .Trees
@reexport using .Uploaders
@reexport using .Videos

Expand Down
11 changes: 10 additions & 1 deletion src/Trees.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,21 @@ module Trees
using Genie, Stipple, StippleUI, StippleUI.API
import Genie.Renderer.Html: HTMLString, normal_element, register_normal_element

export tree
export tree, TreeSelectable

register_normal_element("q__tree", context = @__MODULE__)

function tree(args...; kwargs...)
q__tree(args...; kw(kwargs)...)
end

Base.Base.@kwdef struct TreeSelectable
var""::R{Vector{Dict{Symbol, Any}}} = Dict{Symbol, Any}[]
_selected::R{String} = ""
_expanded::R{Vector{String}} = String[]
_ticked::R{Vector{String}} = String[]
end

TreeSelectable(tree; kwargs...) = TreeSelectable(; var"" = tree, kwargs...)

end

2 comments on commit 78b4d8e

@hhaensel
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request updated: JuliaRegistries/General/63857

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.19.3 -m "<description of version>" 78b4d8e34459e7f27f34747929dcf429d5d105bc
git push origin v0.19.3

Please sign in to comment.