Documentation ¶
Index ¶
- func AcceptChoices(accept bool) tea.Cmd
- func DefaultKeyMap() keys.KeyMap
- func VimKeyMap() keys.KeyMap
- type Component
- func (m *Component) AfterUpdate() tea.Cmd
- func (m Component) CurrentItem() int
- func (m *Component) DefaultKeyMap() *Component
- func (m Component) GetCursor() int
- func (m *Component) GotoBottom()
- func (m *Component) GotoTop()
- func (m Component) Height() int
- func (m *Component) Init(props Props) tea.Cmd
- func (m *Component) MoveDown(n int)
- func (m *Component) MoveUp(n int)
- func (m *Component) Render(w, h int) string
- func (m *Component) SetCursor(n int)
- func (m *Component) SetHeight(h int)
- func (m *Component) SetKeyMap(km keys.KeyMap)
- func (m *Component) SetWidth(w int)
- func (m *Component) Update(msg tea.Msg) tea.Cmd
- func (m *Component) UpdateItems()
- func (m *Component) VimKeyMap() *Component
- func (m Component) Width() int
- type Option
- type Props
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AcceptChoices ¶ added in v0.0.6
AcceptChoices returns a confirmation dialogue.
func DefaultKeyMap ¶ added in v0.0.6
Types ¶
type Component ¶ added in v0.0.6
type Component struct { reactea.BasicComponent reactea.BasicPropfulComponent[Props] Cursor int KeyMap keys.KeyMap Viewport viewport.Model // contains filtered or unexported fields }
func (*Component) AfterUpdate ¶ added in v0.0.6
func (Component) CurrentItem ¶ added in v0.0.6
CurrentItem returns the selected row. You can cast it to your own implementation.
func (*Component) DefaultKeyMap ¶ added in v0.0.6
func (*Component) GotoBottom ¶ added in v0.0.6
func (m *Component) GotoBottom()
GotoBottom moves the selection to the last row.
func (*Component) GotoTop ¶ added in v0.0.6
func (m *Component) GotoTop()
GotoTop moves the selection to the first row.
func (*Component) MoveDown ¶ added in v0.0.6
MoveDown moves the selection down by any number of rows. It can not go below the last row.
func (*Component) MoveUp ¶ added in v0.0.6
MoveUp moves the selection up by any number of rows. It can not go above the first row.
func (*Component) SetHeight ¶ added in v0.0.6
SetHeight sets the height of the viewport of the list.
func (*Component) UpdateItems ¶ added in v0.0.6
func (m *Component) UpdateItems()
UpdateItems updates the list content based on the previously defined columns and rows.
Click to show internal directories.
Click to hide internal directories.