MohamedRejeb / Calf

Calf is a library that allows you to easily create adaptive UIs and access platform specific APIs with Compose Multiplatform (Adaptive UI, File Picker, WebView, Permissions...).
https://mohamedrejeb.github.io/Calf/
Apache License 2.0
709 stars 32 forks source link

Bottom Sheet recomposes entire content If its slightly dragged without fully dismissing #75

Open nilufer32 opened 4 months ago

nilufer32 commented 4 months ago

In the Adaptive Bottom Sheet specifically the iOS implementation, placing any content inside the sheet causes the content to recompose if I slightly drag the sheet downwards and let it snap back to its original height without dismissing it. What I did exactly was I used the Adaptive Bottom Sheet in my iOS module and placed a WebView inside it [also from calf]. dragging the sheet and letting it go back to its original height recomposes the webview inside which causes my webview to reload. Here's a small code snippet:

AdaptiveBottomSheet(
                    onDismissRequest = {  },
                    adaptiveSheetState =
                        rememberAdaptiveSheetState(),
                ) {
                    WebView(
                        state = state,
                    )
                }
nilufer32 commented 4 months ago

update: this issue arises due to jetbrains compose version 1.6.0. older versions do not have this bug. any plans to address the issue?

MohamedRejeb commented 4 months ago

Hi Thanks for reporting this issue. I will check it out.