mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-21 21:09:42 +00:00
clear the search bar if the user changes categories (#752)
Co-authored-by: nyx <nnyyxxxx@users.noreply.github.com>
This commit is contained in:
parent
9353849e16
commit
52565e5ea1
|
@ -164,4 +164,8 @@ impl Filter {
|
||||||
self.search_input.remove(current);
|
self.search_input.remove(current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
pub fn clear_search(&mut self) {
|
||||||
|
self.search_input.clear();
|
||||||
|
self.input_position = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -783,6 +783,7 @@ impl AppState {
|
||||||
0usize,
|
0usize,
|
||||||
)];
|
)];
|
||||||
self.selection.select(Some(0));
|
self.selection.select(Some(0));
|
||||||
|
self.filter.clear_search();
|
||||||
self.update_items();
|
self.update_items();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user