Disable Multiple Selection in JSTree is not working

'checkbox' : {            
 'deselect_all': true,
 'three_state' : false, 
}

works fine!


select_node will select a node regardless of the multiple setting.

The setting only limits user interaction, select_node is a lower level method and will not be limited, so you (the developer) can modify the selection programmatically without limitation.

If you want to use the same function that is triggered by user interaction (and is therefore limited by multiple) use activate_node.


just use this configuration

this.CreateTreeView = function () {

    **"plugins" : [
                "checkbox",  
            ],**  

    $('#jstree_demo_div').jstree({
        'core': {
            **'multiple': false,**
            'data': [
               { "id": "ajson1", "parent": "#", "text": "Simple root node" },
               { "id": "ajson2", "parent": "#", "text": "Root node 2" },
               { "id": "ajson3", "parent": "ajson2", "text": "Child 1" },
               { "id": "ajson4", "parent": "ajson2", "text": "Child 2" },
            ]
        },

        **'checkbox' : {            
            'deselect_all': true,
             'three_state' : false, 
        }**

    }); }