Documentation
¶
Overview ¶
Package loading demonstrates pkg/pane's loading state across a list, a logview, and a tree. Each component starts in SetLoading(true); after a staggered delay, simulated "fetched" data arrives and the spinners are dismissed via SetLoading(false). Press r to refetch.
The screen also illustrates focus cycling across multiple interactive components: tab/shift-tab moves focus between list, logview, and tree. Key messages are routed only to the focused component, so "/" opens one search at a time and h/l scrolls only the focused pane. Spinner ticks and fetch results still fan out to all three so every spinner keeps animating regardless of focus.
Index ¶
- func New(t theme.Theme) screen.Screen
- type Screen
- func (s *Screen) Help() []key.Binding
- func (s *Screen) Init() tea.Cmd
- func (s *Screen) IsCapturingKeys() bool
- func (s *Screen) Layout() layout.Node
- func (s *Screen) OnEnter(any) tea.Cmd
- func (s *Screen) SetTheme(t theme.Theme)
- func (s *Screen) Title() string
- func (s *Screen) Update(msg tea.Msg) (screen.Screen, tea.Cmd)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Screen ¶
type Screen struct {
// contains filtered or unexported fields
}
func (*Screen) IsCapturingKeys ¶
IsCapturingKeys claims keys whenever the focused component is in a text-input state — that's where global keys like q/t would otherwise steal printables from the search box.