mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
fix(menu-controller): add swipeGesture proxy (#18806)
This commit is contained in:
@ -59,9 +59,21 @@ export class MenuController {
|
|||||||
* @param shouldEnable True if it should be swipe-able, false if not.
|
* @param shouldEnable True if it should be swipe-able, false if not.
|
||||||
* @param [menuId] Optionally get the menu by its id, or side.
|
* @param [menuId] Optionally get the menu by its id, or side.
|
||||||
* @return Returns the instance of the menu, which is useful for chaining.
|
* @return Returns the instance of the menu, which is useful for chaining.
|
||||||
|
* @deprecated Use swipeGesture() instead
|
||||||
*/
|
*/
|
||||||
swipeEnable(shouldEnable: boolean, menuId?: string): Promise<HTMLIonMenuElement> {
|
swipeEnable(shouldEnable: boolean, menuId?: string): Promise<HTMLIonMenuElement> {
|
||||||
return proxyMethod(CTRL, this.doc, 'swipeEnable', shouldEnable, menuId);
|
console.warn('MenuController.swipeEnable is deprecated. Use MenuController.swipeGesture() instead');
|
||||||
|
return this.swipeGesture(shouldEnable, menuId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to enable or disable the ability to swipe open the menu.
|
||||||
|
* @param shouldEnable True if it should be swipe-able, false if not.
|
||||||
|
* @param [menuId] Optionally get the menu by its id, or side.
|
||||||
|
* @return Returns the instance of the menu, which is useful for chaining.
|
||||||
|
*/
|
||||||
|
swipeGesture(shouldEnable: boolean, menuId?: string): Promise<HTMLIonMenuElement> {
|
||||||
|
return proxyMethod(CTRL, this.doc, 'swipeGesture', shouldEnable, menuId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user