File tree Expand file tree Collapse file tree
crossPlatform/src/commonMain/kotlin/fr/berliat/hskwidget/ui/application/content Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package fr.berliat.hskwidget.ui.application.content
22
3- import androidx.compose.animation.animateContentSize
43import androidx.compose.foundation.layout.Arrangement
5- import androidx.compose.foundation.layout.Box
64import androidx.compose.foundation.layout.Row
75import androidx.compose.foundation.layout.fillMaxWidth
86import androidx.compose.material3.ExperimentalMaterial3Api
@@ -83,10 +81,13 @@ fun AppBar(
8381 title = {
8482 Row (verticalAlignment = Alignment .CenterVertically , // center children vertically
8583 horizontalArrangement = Arrangement .SpaceBetween ,
86- modifier = Modifier .animateContentSize()
8784 ) {
8885 val focusRequester = remember { FocusRequester () }
8986
87+ LaunchedEffect (Unit ) {
88+ focusRequester.requestFocus()
89+ }
90+
9091 PillSearchBar (
9192 query = localText,
9293 onQueryChange = { onValueChange(it) },
@@ -106,12 +107,6 @@ fun AppBar(
106107 onValueChange(localText.copy(" " ))
107108 }
108109 )
109-
110- Box (modifier = Modifier .weight(1f ), contentAlignment = Alignment .CenterEnd ) {
111- LaunchedEffect (Unit ) {
112- focusRequester.requestFocus()
113- }
114- }
115110 }
116111 },
117112 navigationIcon = {
You can’t perform that action at this time.
0 commit comments