Skip to content

Commit cf4c64d

Browse files
Used remember with FocusRequester
1 parent 9c1e838 commit cf4c64d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • Jetchat/app/src/main/java/com/example/compose/jetchat/conversation

Jetchat/app/src/main/java/com/example/compose/jetchat/conversation/UserInput.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ private fun SelectorExpanded(currentSelector: InputSelector, onCloseRequested: (
213213
if (currentSelector == InputSelector.NONE) return
214214

215215
// Request focus to force the TextField to lose it
216-
val focusRequester = FocusRequester()
216+
val focusRequester = remember { FocusRequester() }
217217
// If the selector is shown, always request focus to trigger a TextField.onFocusChange.
218218
SideEffect {
219219
if (currentSelector == InputSelector.EMOJI) {

0 commit comments

Comments
 (0)