Skip to content

Commit bcb5b50

Browse files
committed
rm Base.getindex for DashBase.Component methods
these were moved to `DashBase.jl` during the DashBase v1 push
1 parent d01ce73 commit bcb5b50

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

src/app/dashapp.jl

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -40,28 +40,6 @@ mutable struct DashApp
4040

4141
end
4242

43-
const VecChildTypes = Union{NTuple{N, DashBase.Component} where {N}, Vector{<:DashBase.Component}}
44-
45-
function Base.getindex(component::DashBase.Component, id::AbstractString)
46-
component.id == id && return component
47-
hasproperty(component, :children) || return nothing
48-
cc = component.children
49-
return if cc isa Union{VecChildTypes, DashBase.Component}
50-
cc[id]
51-
elseif cc isa AbstractVector
52-
identity.(filter(x->hasproperty(x, :id), cc))[id]
53-
else
54-
nothing
55-
end
56-
end
57-
function Base.getindex(children::VecChildTypes, id::AbstractString)
58-
for element in children
59-
element.id == id && return element
60-
el = element[id]
61-
el !== nothing && return el
62-
end
63-
end
64-
6543
#only name, index_string and layout are available to set
6644
function Base.setproperty!(app::DashApp, property::Symbol, value)
6745
property == :index_string && return set_index_string!(app, value)

0 commit comments

Comments
 (0)