Topic: Using Sidenav with collapse and *ngFor causes child.querySelector is not a function

amotiq premium asked 2 years ago


Versions:

  • MDB: MDB 5 1.5.1
  • Angular: Angular ^12.2.0
  • Node: v16 LTS
  • NPM: >8

Expected behavior

When using a sidenav with sub-menu items rendered in an ngFor directive it should work just fine and not throw any error, just like it does with a static HTML-Template.

Actual behavior

Using a sidenav with sub-menu items, which are rendered by an ngFor directive, causes the error child.querySelector to be thrown, but only the first time you click on it.

Resources (screenshots, code snippets etc.)

Example Project with code: OneDrive


Arkadiusz Idzikowski staff commented 2 years ago

@amotiq Thank you for reporting this problem, we will check that and add a fix as soon as possible.



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Opened

Specification of the issue

  • ForumUser: Premium
  • Premium support: Yes
  • Technology: MDB Angular
  • MDB Version: MDB5 1.3.0
  • Device: Desktop
  • Browser: Any
  • OS: Any
  • Provided sample code: No
  • Provided link: Yes