From 24dd888e5b40981ebea3ef1ff421bab314551db3 Mon Sep 17 00:00:00 2001 From: machiav3lli Date: Fri, 1 Jul 2022 00:49:59 +0200 Subject: [PATCH] Fix: Clear search when hiting cancel --- .../kotlin/com/looker/droidify/ui/compose/components/TopBar.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/kotlin/com/looker/droidify/ui/compose/components/TopBar.kt b/src/main/kotlin/com/looker/droidify/ui/compose/components/TopBar.kt index 75b3e280..1dc48cb6 100644 --- a/src/main/kotlin/com/looker/droidify/ui/compose/components/TopBar.kt +++ b/src/main/kotlin/com/looker/droidify/ui/compose/components/TopBar.kt @@ -152,6 +152,8 @@ fun ExpandedSearchView( icon = Icons.Rounded.Close, description = stringResource(id = R.string.cancel), onClick = { + textFieldValue = TextFieldValue(text = "") + focusManager.clearFocus() onExpanded(false) onClose() }