-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trees example missing #50
Comments
I'll add api support for you including demo. Ping you in couple of hours. Tq |
I've used trees un the past. Imight deduce a MWE |
@hhaensel that would be really nice. I was about to ping you. How did you get it to work? I'm mostly confused how to pair js object with Reactive model <template>
<div class="q-pa-md q-gutter-sm">
<q-tree
:nodes="simple"
node-key="label"
/>
</div>
</template>
<script>
export default {
data () {
return {
simple: [
{
label: 'Satisfied customers (with avatar)',
avatar: 'https://cdn.quasar.dev/img/boy-avatar.png',
children: [
{
label: 'Good food (with icon)',
icon: 'restaurant_menu',
children: [
{ label: 'Quality ingredients' },
{ label: 'Good recipe' }
]
},
{
label: 'Good service (disabled node with icon)',
icon: 'room_service',
disabled: true,
children: [
{ label: 'Prompt attention' },
{ label: 'Professional waiter' }
]
},
{
label: 'Pleasant surroundings (with icon)',
icon: 'photo',
children: [
{
label: 'Happy atmosphere (with image)',
img: 'https://cdn.quasar.dev/img/logo_calendar_128px.png'
},
{ label: 'Good table presentation' },
{ label: 'Pleasing decor' }
]
}
]
}
]
}
}
}
</script> from: https://v1.quasar.dev/vue-components/tree#basic You can pick this demo as starting point. Although I'm not sure how much of this is useful Stipple Demo: using Stipple
using StippleUI
@reactive mutable struct TreeModel <: ReactiveModel
expanded::R{Vector{String}} = [ "Satisfied customers (with avatar)", "Good food (with icon)" ]
children::R{Vector{Dict{String, String}}} = [
Dict("label" => "Good food (with icon)", "label" => "Good recipe")
]
simple::R{Vector{Vector{Dict{String, Union{String, Vector{Dict{String, String}}}}}}} = [
[
Dict( "label" => "Satisfied customers (with avatar)",
"avatar" => "https://cdn.quasar.dev/img/boy-avatar.png",
"children" => children)
],
]
end
function handlers(tree_model)
tree_model
end
function ui(tree_model)
page(
tree_model,
title = "Tree Components",
class = "container",
[
tree(:simple, nodekey="label")
],
)
end
function factory()
tree_model = TreeModel |> init |> handlers
tree_model
end |
Thank You!!!! Maybe tree is not exported? julia> include("Trees.jl") julia> ┌ Error: UndefVarError: tree not defined |
it's not finished yet. It's not found because the API is not implemented to support |
will add this in docs and close this @hhaensel ?? |
@AbhimanyuAryan Yes please! |
@PGimenez are you responsible for this now? |
I would be very grateful for anything helpful, comprehensive example or just a hint, how to use the Trees module.
The text was updated successfully, but these errors were encountered: