Jstree add checkbox plugin raises Uncaught TypeError: cannot read property 'selected' from undefined

I use jstree jquery plugin to build a tree with ~ 330nodes at three different levels.

When I add a checkbox to add checkboxes to each node tree, I get an error Unspecified TypeError: Cannot read the 'selected' property from undefined. In the div where the tree is installed, only the message "Download" is displayed.

$(document).ready(function() {

    buildTreeJson((testTree) => {
        $(function() {
            $('#jstreetest').jstree({
                "core": {
                    "data": testTree,
                    "themes": {
                        "variant": "large"
                    }
                },
                "checkbox": {
                    "keep_selected_style": false
                },
                "plugins": ["themes", "checkbox", "changed"]
            });
        });
    });

...

Removing the checkbox plugin I have no problem.

+4
source share
1 answer

OP, , :

, , .

0

Source: https://habr.com/ru/post/1651235/


All Articles