You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Ionic 4] error TS2339: Property 'width' does not exist on type 'HTMLIonMenuElement'. #14794
Ok so I just tested, I probably did something wrong, but I was unable to get the width of the menu thru this exposed function, I always get undefined
But I found I guess a workaround
const menu: HTMLIonMenuElement = await this.menuController.get('myMenu');
console.log(menu.getWidth()); // --> undefined
console.log(menu.clientWidth); // --> the width of the menu
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Activity
peterpeterparker commentedon Jul 24, 2018
In v4.0.0-alpha.12
getWidthis there, could confirm it compilesI'm not there to test it but looks good
Side note:
In Ionic v3 method's name is
width()and in v4getWidth()just in case someone would land on that in the futurebrandyscarney commentedon Jul 30, 2018
@manucorporat Can we document the breaking change for the method name?
peterpeterparker commentedon Aug 2, 2018
Ok so I just tested, I probably did something wrong, but I was unable to get the width of the menu thru this exposed function, I always get
undefinedBut I found I guess a workaround
ionitron-bot commentedon Sep 1, 2018
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.