Topic: SideNav does not remove fixed-sn on destroy

gordysc pro asked 6 years ago


I am using *ngIf to show/hide the sidenav in the Angular version.  I noticed the "fixed-sn" class is being added to the main DOM element when the component is initialized, but it appears to leave it on the main DOM node when being destroyed.  I managed to fix this by doing the following:

constructor(private rd: Renderer2) { }

ngOnDestroy () { this.rd.removeClass(document.body, 'fixed-sn'); }

While this fixes my issue, I imagine other people will want this in the future.  Can this be incorporated into the Sidenav by default?


Arkadiusz Idzikowski staff answered 6 years ago


Dear gordysc, Thanks for letting us know, we will take a look at it. Best, Arek

Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Answered

Specification of the issue

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