mirror of
https://github.com/taigrr/bubbletea.git
synced 2026-04-02 02:59:09 -07:00
Remove unused filtering stuff from simple list example
This commit is contained in:
@@ -23,7 +23,7 @@ var (
|
|||||||
|
|
||||||
type item string
|
type item string
|
||||||
|
|
||||||
func (i item) FilterValue() string { return string(i) }
|
func (i item) FilterValue() string { return "" }
|
||||||
|
|
||||||
type itemDelegate struct{}
|
type itemDelegate struct{}
|
||||||
|
|
||||||
@@ -77,21 +77,12 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
|||||||
m.choice = string(i)
|
m.choice = string(i)
|
||||||
}
|
}
|
||||||
return m, tea.Quit
|
return m, tea.Quit
|
||||||
|
|
||||||
default:
|
|
||||||
if !m.list.SettingFilter() && (keypress == "q" || keypress == "esc") {
|
|
||||||
m.quitting = true
|
|
||||||
return m, tea.Quit
|
|
||||||
}
|
|
||||||
|
|
||||||
var cmd tea.Cmd
|
|
||||||
m.list, cmd = m.list.Update(msg)
|
|
||||||
return m, cmd
|
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
|
||||||
return m, nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var cmd tea.Cmd
|
||||||
|
m.list, cmd = m.list.Update(msg)
|
||||||
|
return m, cmd
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m model) View() string {
|
func (m model) View() string {
|
||||||
|
|||||||
Reference in New Issue
Block a user