summaryrefslogtreecommitdiff
path: root/internal/tui/app.go
diff options
context:
space:
mode:
authorT <t@tjp.lol>2025-09-02 12:22:31 -0600
committerT <t@tjp.lol>2025-09-02 12:24:05 -0600
commit746ac3c29cad01f99f19c58e66dff4a02819704a (patch)
treef2a047b7f86689b4cfbba3fd7da02a1be5f35a0d /internal/tui/app.go
parentd6dfc913fcca4f25e8d5454a03aa559811fba9ab (diff)
history pane: reset selection indices on filter criteria changes
Diffstat (limited to 'internal/tui/app.go')
-rw-r--r--internal/tui/app.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/tui/app.go b/internal/tui/app.go
index 6031adb..fe5f364 100644
--- a/internal/tui/app.go
+++ b/internal/tui/app.go
@@ -219,6 +219,7 @@ func (m AppModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
case updateHistoryFilter:
m.historyBox.filter = HistoryFilter(msg)
+ m.historyBox.resetSelection()
cmds = append(cmds, m.refreshCmd)
case openReportModal:
@@ -245,6 +246,7 @@ func (m *AppModel) filterHistoryByProjectBox() {
} else {
m.historyBox.filter.ProjectID = nil
}
+ m.historyBox.resetSelection()
}
func (m *AppModel) openEntryEditor() {