clear filter via esc

This commit is contained in:
2025-07-13 20:19:41 -07:00
parent 928db70011
commit 460917ceca
4 changed files with 21 additions and 5 deletions

View File

@@ -42,7 +42,14 @@ func (m *TableListModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
func (m *TableListModel) handleSearchInput(msg tea.KeyMsg) (tea.Model, tea.Cmd) {
switch msg.String() {
case "esc", "enter":
case "esc":
m.searching = false
// If there's an existing filter, clear it
if m.searchInput != "" {
m.searchInput = ""
m.filterTables()
}
case "enter":
m.searching = false
m.filterTables()
case "backspace":