Skip to content

Commit

Permalink
update: [ANDROAPP-4826] focus next restored
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidAparicioAlbaAsenjo committed Jan 31, 2024
1 parent aabb3f9 commit 6dcf25d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions form/src/main/java/org/dhis2/form/ui/Form.kt
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ fun Form(
}
}
if (sections.isNotEmpty()) {
val focusNext = remember { mutableStateOf(false) }
LazyColumn(
modifier = Modifier
.fillMaxSize()
Expand Down Expand Up @@ -136,6 +137,7 @@ fun Form(
onNextClicked = {
if (index == section.fields.size - 1) {
onNextSection()
focusNext.value = true
} else {
focusManager.moveFocus(FocusDirection.Down)
}
Expand Down

0 comments on commit 6dcf25d

Please sign in to comment.