MCPcopy
hub / github.com/mathaou/termdbms / Index

Method Index

list/list.go:393–395  ·  view source on GitHub ↗

Index returns the index of the currently selected item as it appears in the entire slice of items.

()

Source from the content-addressed store, hash-verified

391// Index returns the index of the currently selected item as it appears in the
392// entire slice of items.
393func (m Model) Index() int {
394 return m.Paginator.Page*m.Paginator.PerPage + m.cursor
395}
396
397// Cursor returns the index of the cursor on the current page.
398func (m Model) Cursor() int {

Callers 4

SelectedItemMethod · 0.95
updatePaginationMethod · 0.95
RenderMethod · 0.80
RenderMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected