Skip to content

Commit

Permalink
fix: [ANDROAPP-6579] Add offset as a parameter for dropdown menu (#338)
Browse files Browse the repository at this point in the history
* fix: [ANDROAPP-6579] add DpOffset as parameter for dropdown menu

* fix: [ANDROAPP-6579] remove pop up properties
  • Loading branch information
xavimolloy authored Dec 10, 2024
1 parent 1da672c commit 5f62bf6
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import androidx.compose.material3.DropdownMenu
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.DpOffset
import androidx.compose.ui.unit.dp
import org.hisp.dhis.mobile.ui.designsystem.theme.DHISShapes
import org.hisp.dhis.mobile.ui.designsystem.theme.Shape
Expand All @@ -16,6 +17,7 @@ fun <T> DropDownMenu(
modifier: Modifier = Modifier,
items: List<MenuItemData<T>>,
expanded: Boolean = false,
offset: DpOffset = DpOffset(0.dp, 0.dp),
selectedItemIndex: Int? = null,
onDismissRequest: () -> Unit,
onItemClick: (T) -> Unit,
Expand All @@ -27,6 +29,7 @@ fun <T> DropDownMenu(
.widthIn(min = 270.dp),
expanded = expanded,
onDismissRequest = onDismissRequest,
offset = offset,
) {
items.forEachIndexed { index, item ->
MenuItem(
Expand Down

0 comments on commit 5f62bf6

Please sign in to comment.