Move BottomSheet BackHandler to the correct place
This commit is contained in:
parent
4e5f17de23
commit
ca90213eaf
1 changed files with 1 additions and 2 deletions
|
@ -74,8 +74,6 @@ fun BottomSheet(
|
||||||
mutableStateOf(state.value)
|
mutableStateOf(state.value)
|
||||||
}
|
}
|
||||||
|
|
||||||
BackHandler(enabled = !state.isCollapsed, onBack = state.collapse)
|
|
||||||
|
|
||||||
Box {
|
Box {
|
||||||
if (handleOutsideInteractionsWhenExpanded && !state.isCollapsed) {
|
if (handleOutsideInteractionsWhenExpanded && !state.isCollapsed) {
|
||||||
Spacer(
|
Spacer(
|
||||||
|
@ -157,6 +155,7 @@ fun BottomSheet(
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
) {
|
) {
|
||||||
if (!state.isCollapsed) {
|
if (!state.isCollapsed) {
|
||||||
|
BackHandler(onBack = state.collapse)
|
||||||
content()
|
content()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue