Clear | func (v *VirtualList) Clear() | Clear removes all items |
GetItem | func (v *VirtualList) GetItem(index int) *VirtualListItem | GetItem returns item at index (may trigger fetch) |
GetSelectedIndex | func (v *VirtualList) GetSelectedIndex() int | GetSelectedIndex returns the currently selected index |
GetSelectedItem | func (v *VirtualList) GetSelectedItem() *VirtualListItem | GetSelectedItem returns the currently selected item |
GetTotalCount | func (v *VirtualList) GetTotalCount() int | GetTotalCount returns total number of items |
GetVisibleRange | func (v *VirtualList) GetVisibleRange() (start, end int) | GetVisibleRange returns currently visible index range |
Refresh | func (v *VirtualList) Refresh() | Refresh re-fetches visible items and redraws |
ScrollTo | func (v *VirtualList) ScrollTo(index int) | ScrollTo scrolls to show a specific index |
ScrollToBottom | func (v *VirtualList) ScrollToBottom() | ScrollToBottom scrolls to the last item |
ScrollToTop | func (v *VirtualList) ScrollToTop() | ScrollToTop scrolls to the first item |
SetDefaultItemHeight | func (v *VirtualList) SetDefaultItemHeight(height int) *VirtualList | SetDefaultItemHeight sets height for items (default 1) |
SetFetchFunc | func (v *VirtualList) SetFetchFunc(fn FetchFunc) *VirtualList | SetFetchFunc sets the lazy loading function |
SetItems | func (v *VirtualList) SetItems(items []VirtualListItem) *VirtualList | SetItems sets all items directly (for smaller lists) |
SetOnChange | func (v *VirtualList) SetOnChange(fn func(index int, item VirtualListItem)) *VirtualList | SetOnChange is called when selection changes |
SetOnScrollEnd | func (v *VirtualList) SetOnScrollEnd(fn func()) *VirtualList | SetOnScrollEnd is called when scrolled to the end |
SetOnSelect | func (v *VirtualList) SetOnSelect(fn func(index int, item VirtualListItem)) *VirtualList | SetOnSelect is called when Enter is pressed on an item |
SetOverscan | func (v *VirtualList) SetOverscan(count int) *VirtualList | SetOverscan sets how many items to render outside visible area |
SetPageSize | func (v *VirtualList) SetPageSize(size int) *VirtualList | SetPageSize sets items per page for PgUp/PgDn |
SetRenderFunc | func (v *VirtualList) SetRenderFunc(fn RenderFunc) *VirtualList | SetRenderFunc sets the custom render function |
SetSelectedID | func (v *VirtualList) SetSelectedID(id string) *VirtualList | SetSelectedID sets selection by item ID |
SetSelectedIndex | func (v *VirtualList) SetSelectedIndex(index int) *VirtualList | SetSelectedIndex sets selection by index |
SetShowIndex | func (v *VirtualList) SetShowIndex(show bool) *VirtualList | SetShowIndex shows item index/number |
SetShowScrollbar | func (v *VirtualList) SetShowScrollbar(show bool) *VirtualList | SetShowScrollbar enables/disables scrollbar |
SetTotalCount | func (v *VirtualList) SetTotalCount(count int) *VirtualList | SetTotalCount sets the total number of items (for lazy loading) |