fix: tree root node not displaying

This commit is contained in:
hstyi
2025-06-30 00:04:24 +08:00
committed by hstyi
parent 09d837f5b8
commit 885c0a6337
3 changed files with 22 additions and 2 deletions

View File

@@ -183,6 +183,10 @@ class WelcomePanel(private val windowScope: WindowScope) : JPanel(BorderLayout()
|| node.host.username.contains(text)
}
override fun canFilter(): Boolean {
return searchTextField.text.isNotBlank()
}
})
searchTextField.addKeyListener(object : KeyAdapter() {

View File

@@ -3,4 +3,6 @@ package app.termora.tree
interface Filter {
fun filter(node: Any): Boolean
fun canFilter() = true
}