Set the items available in the list. This returns a command.
(i []Item)
| 283 | |
| 284 | // Set the items available in the list. This returns a command. |
| 285 | func (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. |
| 299 | func (m *Model) Select(index int) { |
nothing calls this directly
no test coverage detected