Skip to content

Commit

Permalink
expose list.FilterMachesMsg (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
jon4hz committed Jan 11, 2022
1 parent c426cb5 commit 7a728ea
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions list/list.go
Expand Up @@ -75,7 +75,7 @@ func (f filteredItems) matches() [][]int {
return agg
}

type filterMatchesMsg []filteredItem
type FilterMatchesMsg []filteredItem

type statusMessageTimeoutMsg struct{}

Expand Down Expand Up @@ -694,7 +694,7 @@ func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) {
return m, tea.Quit
}

case filterMatchesMsg:
case FilterMatchesMsg:
m.filteredItems = filteredItems(msg)
return m, nil

Expand Down Expand Up @@ -1125,7 +1125,7 @@ func (m Model) spinnerView() string {
func filterItems(m Model) tea.Cmd {
return func() tea.Msg {
if m.FilterInput.Value() == "" || m.filterState == Unfiltered {
return filterMatchesMsg(m.itemsAsFilterItems()) // return nothing
return FilterMatchesMsg(m.itemsAsFilterItems()) // return nothing
}

targets := []string{}
Expand All @@ -1146,7 +1146,7 @@ func filterItems(m Model) tea.Cmd {
})
}

return filterMatchesMsg(filterMatches)
return FilterMatchesMsg(filterMatches)
}
}

Expand Down

0 comments on commit 7a728ea

Please sign in to comment.