show results on entry is not empty

This commit is contained in:
yggverse 2024-12-18 08:36:51 +02:00
parent 98d2f15136
commit 971ee50dfe

View File

@ -57,13 +57,13 @@ impl Form {
let result = result.clone();
let separator = separator.clone();
let subject = subject.clone();
move |_| {
move |this| {
let matches = find(
subject.borrow().as_ref().unwrap(), // @TODO handle
input.entry.text().as_str(),
match_case.is_active(),
);
if !matches.is_empty() {
if !this.text().is_empty() && !matches.is_empty() {
result.show(0, matches.len());
separator.set_visible(true);
} else {