New Features #1
@ -24,5 +24,14 @@ class SearchController(private val model: Model) {
|
|||||||
val searchMode = searchModeToggleGroup.selectedToggle.userData as SearchMode
|
val searchMode = searchModeToggleGroup.selectedToggle.userData as SearchMode
|
||||||
model.search(newValue, searchMode)
|
model.search(newValue, searchMode)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
searchModeToggleGroup.selectedToggleProperty().addListener { _, _, newValue ->
|
||||||
|
if (textFieldSearch.text.isNullOrBlank()) {
|
||||||
|
return@addListener
|
||||||
|
}
|
||||||
|
|
||||||
|
val searchMode = newValue.userData as SearchMode
|
||||||
|
model.search(textFieldSearch.text, searchMode)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user