From ab89603d28d9c9a0cb51e1d1de7968afbd06732b Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Tue, 9 Nov 2021 10:24:21 -0500 Subject: [PATCH] Remove unused filtering stuff from simple list example --- examples/list-simple/main.go | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/examples/list-simple/main.go b/examples/list-simple/main.go index d9f88a2..3d0449b 100644 --- a/examples/list-simple/main.go +++ b/examples/list-simple/main.go @@ -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,21 +77,12 @@ 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 - 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 {