Update customView.go

This commit is contained in:
Alexei Anoshenko 2026-06-16 15:17:17 +03:00
parent 7214eda01d
commit 73b0ee0c5c
1 changed files with 21 additions and 1 deletions

View File

@ -246,13 +246,33 @@ func (customView *CustomViewData) isNoResizeEvent() bool {
// Views return a list of child views
func (customView *CustomViewData) Views() []View {
if customView.superView != nil {
if container, ok := customView.superView.(ViewsContainer); ok {
if container, ok := customView.superView.(ParentView); ok {
return container.Views()
}
}
return []View{}
}
func (customView *CustomViewData) ViewSeq() iter.Seq[View] {
if customView.superView != nil {
if container, ok := customView.superView.(ParentView); ok {
return container.ViewSeq()
}
}
return func(yield func(View) bool) {
}
}
func (customView *CustomViewData) ViewCount() int {
if customView.superView != nil {
if container, ok := customView.superView.(ParentView); ok {
return container.ViewCount()
}
}
return 0
}
// Append appends a view to the end of the list of a view children
func (customView *CustomViewData) Append(view View) {
if customView.superView != nil {