mirror of
https://github.com/Maks1mS/bubbles.git
synced 2024-12-24 14:44:38 +03:00
expose list.FilterMachesMsg (#77)
This commit is contained in:
parent
c426cb580b
commit
7a728eae31
@ -75,7 +75,7 @@ func (f filteredItems) matches() [][]int {
|
||||
return agg
|
||||
}
|
||||
|
||||
type filterMatchesMsg []filteredItem
|
||||
type FilterMatchesMsg []filteredItem
|
||||
|
||||
type statusMessageTimeoutMsg struct{}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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{}
|
||||
@ -1146,7 +1146,7 @@ func filterItems(m Model) tea.Cmd {
|
||||
})
|
||||
}
|
||||
|
||||
return filterMatchesMsg(filterMatches)
|
||||
return FilterMatchesMsg(filterMatches)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user