diff --git a/form/src/main/java/org/dhis2/form/ui/Form.kt b/form/src/main/java/org/dhis2/form/ui/Form.kt index 9fcdb8d8cc..0f60814b11 100644 --- a/form/src/main/java/org/dhis2/form/ui/Form.kt +++ b/form/src/main/java/org/dhis2/form/ui/Form.kt @@ -70,17 +70,17 @@ fun Form( if (sections.isNotEmpty()) { val focusNext = remember { mutableStateOf(false) } LazyColumn( - modifier = Modifier - .fillMaxSize() - .background(Color.White) - .clickable( - interactionSource = MutableInteractionSource(), - indication = null, - onClick = { focusManager.clearFocus() }, - ), - contentPadding = PaddingValues(horizontal = 16.dp, vertical = 16.dp), - state = scrollState, - ) { + modifier = Modifier + .fillMaxSize() + .background(Color.White) + .clickable( + interactionSource = MutableInteractionSource(), + indication = null, + onClick = { focusManager.clearFocus() }, + ), + contentPadding = PaddingValues(horizontal = 16.dp, vertical = 16.dp), + state = scrollState, + ) { this.itemsIndexed( items = sections, key = { _, fieldUiModel -> fieldUiModel.uid }, @@ -220,7 +220,6 @@ private fun LaunchIfTrue(key: Boolean, block: suspend CoroutineScope.() -> Unit) } - private fun getNextSection(section: FormSection, sections: List): FormSection? { val currentIndex = sections.indexOf(section) if (currentIndex != -1 && currentIndex < sections.size - 1) {