Topic: [Treeview] Uncaught TypeError: Cannot read property 'parentNode' of null

Antons free asked 1 year ago


Expected behavior When a parent element is filtered, an error appears, so parent elements that do not contain subelements could be omitted, since no subelements would be expanded.

Actual behavior Error in the mdbootstrap treeview plugin latest version, when filtering a main element (parent) without sub elements (children), an error appears in the console: Uncaught TypeError: Cannot read property 'parentNode' of null at Object.parents (selector-engine.js:44) at r.value (treeview.js:155) at treeview.js:189 at Map.forEach () at treeview.js:170

This issue also arises when filtering a sub-element that contains the same name as a parent element.

Resources (screenshots, code snippets etc.) enter link description here


Kamila Pieńkowska staff answered 1 year ago


I will close this thread since you made second one about the same issue, with more description.


FREE CONSULTATION

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

Status

Closed

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: MDB5 6.1.0
  • Device: PC HP
  • Browser: Google Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: Yes