diff --git a/tui/src/filter.rs b/tui/src/filter.rs index e6ff2cc2..2954a76a 100644 --- a/tui/src/filter.rs +++ b/tui/src/filter.rs @@ -158,4 +158,8 @@ impl Filter { self.search_input.remove(current); } } + pub fn clear_search(&mut self) { + self.search_input.clear(); + self.input_position = 0; + } } diff --git a/tui/src/state.rs b/tui/src/state.rs index ce724868..455e8dbb 100644 --- a/tui/src/state.rs +++ b/tui/src/state.rs @@ -723,6 +723,7 @@ impl AppState { .root() .id()]; self.selection.select(Some(0)); + self.filter.clear_search(); self.update_items(); }