Skip to content

Commit 4eff1bf

Browse files
authored
Fix filter example when entering 'q' in the text box (#207)
1 parent c377f0b commit 4eff1bf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

examples/filter/main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
7373
case tea.KeyMsg:
7474
switch msg.String() {
7575
case "ctrl+c", "q":
76-
cmds = append(cmds, tea.Quit)
76+
if !m.table.GetIsFilterInputFocused() {
77+
cmds = append(cmds, tea.Quit)
78+
}
7779
}
7880

7981
}

0 commit comments

Comments
 (0)