Thread
#compose
    divid3d

    divid3d

    1 year ago
    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

    darkmoon_uk

    1 year ago
    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...
    divid3d

    divid3d

    1 year ago
    That's true, but my goal is to completely disable dragging of bottom sheet.
    d

    darkmoon_uk

    1 year ago
    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
    divid3d

    divid3d

    1 year ago
    It seems you have a good point but I'm looking for solution related to
    ModalBottomSheetLayout
    instead of
    BottomSheetScaffold
    Ch8n

    Ch8n

    10 months ago
    @divid3d did you find any way disable swipe on
    BottomSheetScaffold
    ?