Skip to content

Commit 85990e0

Browse files
committed
Fixed Searchbar not working
1 parent e5d8924 commit 85990e0

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

src/ui/host_list.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,10 @@ def _on_search_button_clicked(self, button):
441441
self.search_entry.set_text("")
442442
self.filter_hosts("")
443443

444-
def _on_search_changed(self, search_bar, query):
444+
def _on_search_changed(self, entry):
445445
"""Handle search query changes."""
446-
self.filter_hosts(query)
446+
try:
447+
text = entry.get_text()
448+
except Exception:
449+
text = ""
450+
self.filter_hosts(text)

src/ui/main_window.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,9 +580,13 @@ def _on_show_toast(self, editor, message: str):
580580
"""Handle show-toast signal from host editor."""
581581
self.show_toast(message)
582582

583-
def _on_search_changed(self, search_bar, query):
583+
def _on_search_changed(self, entry):
584584
"""Handle search query changes."""
585-
self.host_list.filter_hosts(query)
585+
try:
586+
text = entry.get_text()
587+
except Exception:
588+
text = ""
589+
self.host_list.filter_hosts(text)
586590

587591
def _on_open_config(self, action, param):
588592
"""Handle open config action."""

0 commit comments

Comments
 (0)