forked from Mirrors/bubbletea
Remove unused filtering stuff from simple list example
This commit is contained in:
parent
a55bf775cd
commit
ab89603d28
|
@ -23,7 +23,7 @@ var (
|
|||
|
||||
type item string
|
||||
|
||||
func (i item) FilterValue() string { return string(i) }
|
||||
func (i item) FilterValue() string { return "" }
|
||||
|
||||
type itemDelegate struct{}
|
||||
|
||||
|
@ -77,11 +77,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
|||
m.choice = string(i)
|
||||
}
|
||||
return m, tea.Quit
|
||||
|
||||
default:
|
||||
if !m.list.SettingFilter() && (keypress == "q" || keypress == "esc") {
|
||||
m.quitting = true
|
||||
return m, tea.Quit
|
||||
}
|
||||
}
|
||||
|
||||
var cmd tea.Cmd
|
||||
|
@ -89,11 +85,6 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
|||
return m, cmd
|
||||
}
|
||||
|
||||
default:
|
||||
return m, nil
|
||||
}
|
||||
}
|
||||
|
||||
func (m model) View() string {
|
||||
if m.choice != "" {
|
||||
return quitTextStyle.Render(fmt.Sprintf("%s? Sounds good to me.", m.choice))
|
||||
|
|
Loading…
Reference in New Issue