Skip to content

Commit

Permalink
[FEAT/#328] 키보드 포커싱 설정 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
arinming committed Jan 13, 2025
1 parent 08689a6 commit 4e3ab37
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableIntStateOf
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.focus.FocusRequester
Expand Down Expand Up @@ -159,6 +162,7 @@ fun SearchProcessScreen(
val focusRequester = remember { FocusRequester() }
val focusManager = LocalFocusManager.current
val currentSortBy = remember { mutableIntStateOf(state.currentSortBy) }
var isInitialFocusSet by rememberSaveable { mutableStateOf(false) }

val amplitudeTracker = LocalTracker.current

Expand All @@ -172,10 +176,15 @@ fun SearchProcessScreen(
}
}


LaunchedEffect(Unit) {
focusRequester.requestFocus()
if (!isInitialFocusSet) {
focusRequester.requestFocus()
isInitialFocusSet = true
}
}


Column(
modifier = Modifier
.background(White)
Expand Down

0 comments on commit 4e3ab37

Please sign in to comment.