Skip to content

Commit

Permalink
removing the focus from textfield (microsoft#650)
Browse files Browse the repository at this point in the history
Co-authored-by: PraveenKumar <pyeruva@microsoft.com>
  • Loading branch information
praveen970 and PraveenKumar authored May 2, 2024
1 parent 0aa5b07 commit 737a198
Showing 1 changed file with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,16 +126,7 @@ fun TextField(
textAvailable = value.isNotEmpty()
)

val focusRequester = remember { FocusRequester() }

Column(modifier = modifier
.onFocusChanged { focusState ->
when {
focusState.isFocused -> {
focusRequester.requestFocus()
}
}
}
.background(token.backgroundBrush(textFieldInfo))
.padding(token.leftRightPadding(textFieldInfo))) {
if (!label.isNullOrBlank()) {
Expand Down Expand Up @@ -185,7 +176,6 @@ fun TextField(
.testTag(TEXT_FIELD)
.padding(vertical = 12.dp)
.weight(1F)
.focusRequester(focusRequester)
.onFocusChanged { state ->
isFocused = false
when {
Expand Down

0 comments on commit 737a198

Please sign in to comment.