Topic: [treview.min.js] Uncaught TypeError: Cannot read properties of null (reading 'parentNode')

Antons free asked 1 year ago


Expected behavior: When filtering some element, it is not necessary to filter the

  • elements that do not contain sub elements, since it would not be expanding any sub element, therefore it generates an error, this can be seen in the example published in the treeview plugin documentation In filters, if we place One in the search engine, it gives an error in the console since the One element does not contain sub elements, this can affect the operation if in that case we have a sub element with the same name as an element (without sub elements) , that we need to filter, so it would be great to add an exception to avoid this error in the console

    Actual behavior: In the latest version of the treeview plugin it generates an error when using filters, this happens when we place a name of a main

  • element (which does not contain sub elements), when searching for said element it generates the error:

    Uncaught TypeError: Cannot read properties of null (reading 'parentNode') at Object.parents (treeview.min.js:1:48671) at r.value (treeview.min.js:1:57398) at treeview.min.js:1:57813 at Map.forEach () at treeview.min.js:1:57628

    Resources (screenshots, code snippets etc.)

    Attached images of the error in the console generated when trying to filter an element that does not contain sub elements, this error was verified from the treeview plugin documentation on its official page:

https://drive.google.com/file/d/1rqBmKcKdVZp0r1rUBJC6jlLht_r3b7eJ/view?usp=sharing

https://drive.google.com/file/d/1qjoJH9DO-fr5ZdX62xvOmfhnk8zomjUx/view?usp=sharing


Kamila Pieńkowska staff answered 1 year ago


This is a bug and we will fix it as soon as possible.


Antons free commented 1 year ago

Very well, I will wait for the corrections, thank you very much in advance.


kelley premium commented 1 week ago

Has this bug been addressed or is there a workaround? I purchased this plugin yesterday and have already run into it..


Grzegorz Bujański staff commented 1 week ago

This bug has been fixed. If you check our documentation for the exact same case, everything works fine. However, there is another bug described here: https://mdbootstrap.com/support/standard/tree-view-filter-omits-elements-at-lowest-level-in-tree/ but we are already working on fixing it. If you still have a problem with Treeview and it is not one of these two cases, please create a new thread and describe in detail how we can reproduce this error



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: 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