1

I have a RadSideDrawer that is apparently available through the whole app. Now, there are some routes that I want to prevent the drawer from showing.

I thought of the logical way of doing this is by listening the onDrawerOpening event. However, the event object has no way to prevent the sidedrawer from transiotioning.

Is there a way to handle this scenario?

Thanks!

iamjc015
  • 2,127
  • 6
  • 25
  • 61

2 Answers2

3

You may toggle gesturesEnabled property of SideDrawer whenever you want to enable / disable the swipe gestures.

There is also allowEdgeSwipe which can be used to enable / disable only the open gesture since v4.2.

Manoj
  • 21,753
  • 3
  • 20
  • 41
0

There are many ways to achieve this, one of them is to disable the swipe. I have created a playground for you here.

@ViewChild(RadSideDrawerComponent) public drawerComponent: 
RadSideDrawerComponent;    
if (ios) {
        this.drawerComponent.nativeElement.ios.defaultSideDrawer.allowEdgeSwipe = false;
    } else {
        this.drawerComponent.nativeElement.android.setTouchTargetThreshold(0);
    }
Narendra
  • 4,514
  • 2
  • 21
  • 38