From 73b0ee0c5c5a6a0702446d95e4081087c3052e25 Mon Sep 17 00:00:00 2001 From: Alexei Anoshenko <2277098+anoshenko@users.noreply.github.com> Date: Tue, 16 Jun 2026 15:17:17 +0300 Subject: [PATCH] Update customView.go --- customView.go | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/customView.go b/customView.go index e529346..f6f6d89 100644 --- a/customView.go +++ b/customView.go @@ -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 {