Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Access to DropDownMenu or AlertDialog in common source set #762

Closed
ScottPierce opened this issue Jun 7, 2021 · 6 comments
Closed

No Access to DropDownMenu or AlertDialog in common source set #762

ScottPierce opened this issue Jun 7, 2021 · 6 comments
Assignees

Comments

@ScottPierce
Copy link
Contributor

We currently can't access the DropDownMenu or AlertDialog from the common source set for compose. Someone mentioned this was because of PopupProperties.

@igordmn igordmn self-assigned this Jun 7, 2021
@igordmn
Copy link
Collaborator

igordmn commented Jun 7, 2021

For DropDownMenu we can create a common function in commonMain:

fun DropdownMenu(
    expanded: Boolean,
    onDismissRequest: () -> Unit,
    modifier: Modifier = Modifier,
    offset: DpOffset = DpOffset(0.dp, 0.dp),
    content: @Composable ColumnScope.() -> Unit
)

@avently
Copy link

avently commented Jun 9, 2021

@igordmn could you do the same for AlertDialog? it will help in my situation too (at least for AlertDialog), see #758

@atsushieno
Copy link

atsushieno commented Aug 2, 2021

What is blocking you from adding DropdownMenu as an expect declaration?

@francismariano
Copy link

Is there some milestone for this issue??
Access AlertDialog and DropDownMenu from common sources set sounds great.

compose-android // compose-ios // compose-desktop // compose-web

@atsushieno
Copy link

I don't expect that to happen, because Jetpack Compose API is not designed to be cross platform here. It should be Google who should fix the issue.

So far I have built a workaround package a while ago, to the rescue: https://github.com/atsushieno/compose-mpp

@MatkovIvan
Copy link
Member

It was released in 1.5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants