diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/appskeleton/BottomBar.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/appskeleton/BottomBar.kt index 84dc5b7..db37c45 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/appskeleton/BottomBar.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/appskeleton/BottomBar.kt @@ -95,7 +95,10 @@ fun BottomBar(showMenuDrawer: Boolean = true) { textStyle = TextStyle(color), placeholder = { Text("Umsätze suchen ...", color = color.copy(ContentAlpha.medium), modifier = Modifier.height(48.dp)) }, singleLine = true, - trailingIcon = { Icon(Icons.Filled.Close, contentDescription = "Close search bar", Modifier.clickable { showSearchbar = false }, color) }, + trailingIcon = { Icon(Icons.Filled.Close, contentDescription = "Close search bar", tint = color, modifier = Modifier.clickable { + showSearchbar = false + transactionsFilter.updateSearchTerm("") + }) }, modifier = Modifier.focusRequester(searchFieldFocus).widthIn(150.dp, 250.dp).padding(vertical = 4.dp).onKeyEvent { event -> if (event.key == Key.Escape && event.type == KeyEventType.KeyUp) { if (transactionsFilter.searchTerm.isBlank()) {