Skip to content

Commit fbfc076

Browse files
authored
fix(menu-controller): add swipeGesture proxy (#18806)
1 parent 9b075ef commit fbfc076

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

angular/src/providers/menu-controller.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,21 @@ export class MenuController {
5959
* @param shouldEnable True if it should be swipe-able, false if not.
6060
* @param [menuId] Optionally get the menu by its id, or side.
6161
* @return Returns the instance of the menu, which is useful for chaining.
62+
* @deprecated Use swipeGesture() instead
6263
*/
6364
swipeEnable(shouldEnable: boolean, menuId?: string): Promise<HTMLIonMenuElement> {
64-
return proxyMethod(CTRL, this.doc, 'swipeEnable', shouldEnable, menuId);
65+
console.warn('MenuController.swipeEnable is deprecated. Use MenuController.swipeGesture() instead');
66+
return this.swipeGesture(shouldEnable, menuId);
67+
}
68+
69+
/**
70+
* Used to enable or disable the ability to swipe open the menu.
71+
* @param shouldEnable True if it should be swipe-able, false if not.
72+
* @param [menuId] Optionally get the menu by its id, or side.
73+
* @return Returns the instance of the menu, which is useful for chaining.
74+
*/
75+
swipeGesture(shouldEnable: boolean, menuId?: string): Promise<HTMLIonMenuElement> {
76+
return proxyMethod(CTRL, this.doc, 'swipeGesture', shouldEnable, menuId);
6577
}
6678

6779
/**

0 commit comments

Comments
 (0)