Do not allow search with empty value
This commit is contained in:
parent
7d23b093fc
commit
1bc908b92f
1 changed files with 35 additions and 32 deletions
|
|
@ -922,6 +922,8 @@ impl Application for App {
|
|||
return widget::text_input::focus(self.project_search_id.clone());
|
||||
}
|
||||
Message::ProjectSearchSubmit => {
|
||||
//TODO: Figure out length requirements?
|
||||
if !self.project_search_value.is_empty() {
|
||||
//TODO: cache projects outside of nav model?
|
||||
let mut project_paths = Vec::new();
|
||||
for id in self.nav_model.iter() {
|
||||
|
|
@ -960,6 +962,7 @@ impl Application for App {
|
|||
|x| x,
|
||||
);
|
||||
}
|
||||
}
|
||||
Message::ProjectSearchValue(value) => {
|
||||
self.project_search_value = value;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue