File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/jvmMain/kotlin/com/sunnychung/application/multiplatform/hellohttp/ux Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -682,14 +682,19 @@ fun TextSearchBar(
682682) {
683683 val textSizes = LocalFont .current
684684 Row (modifier = modifier.padding(bottom = 2 .dp), verticalAlignment = Alignment .CenterVertically ) {
685+ val focusRequester = remember { FocusRequester () }
685686 AppTextField (
686687 key = " $key /SearchText" ,
687688 value = text,
688689 onValueChange = onTextChange,
689690 textStyle = LocalTextStyle .current.copy(fontSize = textSizes.searchInputSize),
690691 maxLines = 1 ,
691- modifier = Modifier .weight(1f ),
692692 singleLine = true , // TODO allow '\n'
693+ onFinishInit = {
694+ focusRequester.requestFocus()
695+ },
696+ modifier = Modifier .weight(1f )
697+ .focusRequester(focusRequester),
693698 )
694699 AppText (text = statusText, fontSize = textSizes.supplementSize, modifier = Modifier .padding(horizontal = 4 .dp))
695700 AppTextToggleButton (
You can’t perform that action at this time.
0 commit comments