Skip to content

Commit

Permalink
fix: case-insensitive dropdown search
Browse files Browse the repository at this point in the history
  • Loading branch information
ShubhranshuSanjeev committed Sep 22, 2024
1 parent 1a54fd2 commit aea093e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/frontend/src/components/dropdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ where
let all_options = StoredValue::new(dropdown_options.clone());
let (search_term, set_search_term) = create_signal(String::new());
let dropdown_options = Signal::derive(move || {
let term = search_term.get();
let term = search_term.get().to_lowercase();
all_options
.get_value()
.into_iter()
.filter(|option| option.label().contains(&term))
.filter(|option| option.label().to_lowercase().contains(&term))
.collect::<Vec<T>>()
});

Expand Down

0 comments on commit aea093e

Please sign in to comment.