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

Method SetItems

list/list.go:285–296  ·  view source on GitHub ↗

Set the items available in the list. This returns a command.

(i []Item)

Source from the content-addressed store, hash-verified

283
284// Set the items available in the list. This returns a command.
285func (m *Model) SetItems(i []Item) tea.Cmd {
286 var cmd tea.Cmd
287 m.items = i
288
289 if m.filterState != Unfiltered {
290 m.filteredItems = nil
291 cmd = filterItems(*m)
292 }
293
294 m.updatePagination()
295 return cmd
296}
297
298// Select selects the given index of the list and goes to its respective page.
299func (m *Model) Select(index int) {

Callers

nothing calls this directly

Calls 2

updatePaginationMethod · 0.95
filterItemsFunction · 0.85

Tested by

no test coverage detected