Skip to content

Commit 595f6e8

Browse files
authored
Merge pull request #20 from pbk20191/fix-nested-scroll
�fix nestedScroll when Content is not scrollable
2 parents ee55b39 + ae747e1 commit 595f6e8

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

bottomsheetdialog-compose/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ android {
5252
dependencies {
5353
implementation platform(Dependencies.composeBom)
5454
implementation Dependencies.composeUI
55+
implementation Dependencies.composeFoundation
5556
implementation Dependencies.androidxActivityKtx
5657
implementation Dependencies.androidxCoreKtx
5758
implementation Dependencies.material

bottomsheetdialog-compose/src/main/kotlin/com/holix/android/bottomsheetdialog/compose/BottomSheetDialog.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
package com.holix.android.bottomsheetdialog.compose
22

3+
import androidx.compose.foundation.gestures.Orientation
4+
import androidx.compose.foundation.gestures.rememberScrollableState
5+
import androidx.compose.foundation.gestures.scrollable
36
import android.annotation.SuppressLint
47
import android.content.Context
58
import android.graphics.Outline
@@ -279,6 +282,7 @@ fun BottomSheetDialog(
279282
BottomSheetDialogLayout(
280283
Modifier
281284
.nestedScroll(rememberNestedScrollInteropConnection())
285+
.scrollable(state = rememberScrollableState{ 0f }, orientation = Orientation.Vertical)
282286
.semantics { dialog() },
283287
) {
284288
currentContent()

0 commit comments

Comments
 (0)