Topic: Bug in #dev repo?

Alberto pro asked 4 years ago

Hi I have installed the dev version and in the console now i get ths error ERROR TypeError: Cannot read property 'toggle' of undefined this seems to be the culprit. --> this.body.toggle(this.collapsed); Object.defineProperty(exports, "__esModule", { value: true }); var sb_item_body_1 = __webpack_require__("./node_modules/ng-mdb-pro/pro/accordion/components/sb-item.body.ts"); var sb_config_1 = __webpack_require__("./node_modules/ng-mdb-pro/pro/accordion/components/sb.config.ts"); var SBItemComponent = (function () { function SBItemComponent() { this.collapsed = true; this.squeezebox = sb_config_1.sbConfig.serviceInstance; } SBItemComponent.prototype.ngAfterViewInit = function () { this.body.toggle(this.collapsed); }; SBItemComponent.prototype.toggle = function (collapsed) { this.squeezebox.didItemToggled(this); this.applyToggle(collapsed); }; SBItemComponent.prototype.applyToggle = function (collapsed) { this.collapsed = collapsed; this.body.toggle(collapsed); }; return SBItemComponent; }()); exports.SBItemComponent = SBItemComponent; //# sourceURL=[module] //# sourceMappingURL=data:application/json;charset=utf-

Damian Gemza staff answered 4 years ago

Hello Alberto, Could you provide me reproduction steps? Best Regards, Damian

Alberto pro commented 4 years ago

Hi Damian, Not sure I can as I would have to send you my entire project. I am using the hidden sidenav with fixed navbar. I think it's something in the next release code base because if i use the non dev release it does not happen. I am using the dev release because if i have the mdbRippleRadius class on menus they don't close and apparently it also override the click event. The new code looks like it fixes it.

Damian Gemza staff commented 4 years ago

Alberto I need only reproduction steps to achieve your case on my project. I tried to reproduce it - copied code from docs and ng serve, and for me, everyting is working fine. I am always using dev branch source code, because I'm dev. Without any reproduction steps I'm unable to help you. Best Regards, Damian

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • User: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No