Skip to content

get_bottom_checked function not working correctly? #2801

@Simon3995

Description

@Simon3995

I am using get_bottom_checked as follows:

$('#tree').on('check_node.jstree', (e, data) => {
    let tree = $('#tree');
    console.log(tree.jstree("get_bottom_checked", true));
});

When I check a node I expect to get an array of all bottom-level nodes (nodes without children). When I have a tree that looks like this:

Image

When I uncheck and check the folder, I get an empty array (even though the child nodes do all get checked). If I uncheck and check one of the nodes within the folder I get an array of length 3, as I would expect. Am I correct in thinking this is a bug? Or am I using the function incorrectly?

p.s. I have set up checkbox like this:

checkbox: {
    tie_selection: false,
    whole_node: false,
}

so that the selection and checked status are completely independent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions