diff --git a/android/quest/src/main/java/org/smartregister/fhircore/quest/ui/multiselect/MultiSelectBottomSheetView.kt b/android/quest/src/main/java/org/smartregister/fhircore/quest/ui/multiselect/MultiSelectBottomSheetView.kt index 4c8a451baa..0999e1a2a3 100644 --- a/android/quest/src/main/java/org/smartregister/fhircore/quest/ui/multiselect/MultiSelectBottomSheetView.kt +++ b/android/quest/src/main/java/org/smartregister/fhircore/quest/ui/multiselect/MultiSelectBottomSheetView.kt @@ -161,9 +161,30 @@ fun MultiSelectBottomSheetView( ) } }, - ) { + bottomBar = { + if (syncLocationStateMap.isNotEmpty() && rootTreeNodes.isNotEmpty()) { + Button( + onClick = { onSelectionDone(multiSelectViewAction) }, + modifier = Modifier.fillMaxWidth().padding(vertical = 16.dp, horizontal = 8.dp), + ) { + Text( + text = + stringResource( + id = + when (multiSelectViewAction.first()) { + MultiSelectViewAction.SYNC_DATA -> R.string.sync_data + MultiSelectViewAction.FILTER_DATA -> R.string.apply_filter + }, + ) + .uppercase(), + modifier = Modifier.padding(8.dp), + ) + } + } + }, + ) { paddingValues -> Box( - modifier = Modifier.fillMaxSize().padding(it), + modifier = Modifier.fillMaxSize().padding(paddingValues), contentAlignment = Alignment.TopCenter, ) { if (isLoading.value == true) { @@ -217,27 +238,6 @@ fun MultiSelectBottomSheetView( } } } - item { - if (syncLocationStateMap.isNotEmpty() && rootTreeNodes.isNotEmpty()) { - Button( - onClick = { onSelectionDone(multiSelectViewAction) }, - modifier = Modifier.fillMaxWidth().padding(vertical = 16.dp, horizontal = 8.dp), - ) { - Text( - text = - stringResource( - id = - when (multiSelectViewAction.first()) { - MultiSelectViewAction.SYNC_DATA -> R.string.sync_data - MultiSelectViewAction.FILTER_DATA -> R.string.apply_filter - }, - ) - .uppercase(), - modifier = Modifier.padding(8.dp), - ) - } - } - } } } }