Hi. Is there any possibility to disable dragging in `ModalBottomSheetLayout`? I'm looking for soluti...
d
Hi. Is there any possibility to disable dragging in
ModalBottomSheetLayout
? I'm looking for solution that would allow to hide bottom sheet only programmatically.
d
You should be able to veto any external changes to drawerState by implemeting the
confirmStateChange
function in
drawerState
Default is just
{ true }
to always allow, but you can change to
{ false }
. I'm not sure if programmatic changes are subject to the check...
d
That's true, but my goal is to completely disable dragging of bottom sheet.
d
In that case, without knowing specifics, my general approach would be to look for the
onDragging...
handler
Modifier
and registering one further down the hierarchy to swallow the events before they fall down to the Drawer.
...but there might be a better way
Refer to the API - there's a
gesturesEnabled
flag
maybe setting that
false
will do exactly what you want
d
It seems you have a good point but I'm looking for solution related to
ModalBottomSheetLayout
instead of
BottomSheetScaffold
c
@divid3d did you find any way disable swipe on
BottomSheetScaffold
?
1325 Views