Topic: mdbValidate error when changing route

ngervasi pro asked 6 years ago


Whit latest update (mdb-angular 6.1.3) there's an error when leaving a page if one input has the [mdbValidate]="false" directive. Here's the error:
ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'disconnect' of undefined
TypeError: Cannot read property 'disconnect' of undefined
at MdbInputDirective.push../node_modules/ng-uikit-pro-standard/esm5/ng-uikit-pro-standard.es5.js.MdbInputDirective.ngOnDestroy (ng-uikit-pro-standard.es5.js:14654)
at callProviderLifecycles (core.js:9268)
at callElementProvidersLifecycles (core.js:9236)
at callLifecycleHooksChildrenFirst (core.js:9226)
at destroyView (core.js:10288)
at callViewAction (core.js:10414)
at execComponentViewsAction (core.js:10336)
at destroyView (core.js:10287)
at callWithDebugContext (core.js:11046)
at Object.debugDestroyView [as destroyView] (core.js:10730)
at MdbInputDirective.push../node_modules/ng-uikit-pro-standard/esm5/ng-uikit-pro-standard.es5.js.MdbInputDirective.ngOnDestroy (ng-uikit-pro-standard.es5.js:14654)
at callProviderLifecycles (core.js:9268)
at callElementProvidersLifecycles (core.js:9236)
at callLifecycleHooksChildrenFirst (core.js:9226)
at destroyView (core.js:10288)
at callViewAction (core.js:10414)
at execComponentViewsAction (core.js:10336)
at destroyView (core.js:10287)
at callWithDebugContext (core.js:11046)
at Object.debugDestroyView [as destroyView] (core.js:10730)
at resolvePromise (zone.js:814)
at resolvePromise (zone.js:771)
at zone.js:873
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421)
at Object.onInvokeTask (core.js:3662)
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:420)
at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:188)
at drainMicroTaskQueue (zone.js:595)
at ZoneTask.push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask [as invoke] (zone.js:500)
at invokeTask (zone.js:1540)

Here's the html:  
Start your code here
<div class="md-form">
  <textarea type="text" id="contact-message" class="form-control md-textarea" rows="5" [mdbValidate]="false" mdbInputDirective [(ngModel)]="msg.message" name="message"></textarea>
  <label for="contact-message">Messaggio</label>
</div>
It used to work fine in 6.0.2

Damian Gemza staff commented 6 years ago

Dear ngervasi, Thanks for reaching out our support forum and informing us about the problem. I’ve managed a fix for your case. Please install ng-uikit-pro-standard library from our dev branch, because there is the fix, and let me know, if it solves your problem. Best Regards, Damian

ngervasi pro commented 6 years ago

Tnx Damian, is there a changelog for the dev branch? I'm in production and want to be cautious...

wavelytech pro commented 6 years ago

Hello Damian, I just pulled the dev branch with the same problem, it works for me.

Damian Gemza staff commented 6 years ago

Dear wavelytech and ngervasi, This fix is already on master branch, so you can guys pull it without any problems. Best Regards, Damian

ngervasi pro answered 6 years ago


Tnx for the excellent support Damian!

Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Resolved

Specification of the issue

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