Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


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

amotiq premium asked 3 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 3 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