jstree icon indicating copy to clipboard operation
jstree copied to clipboard

Regarding refreshing a single node.

Open TonyXuChen opened this issue 11 months ago • 0 comments

const deviceOptions = ref({ "core": { "themes": { "responsive": false }, "data": getJstreeData()//Data is dynamically retrieved from the interface. }, "types": { "default": { "icon": "ri-community-fill text-primary" }, "0": { "icon": "ri-database-fill text-secondary" }, "1": { "icon": "ri-database-fill text-success" }, "2": { "icon": "ri-database-fill text-danger" }

},
"plugins": ["types"]

}) I'm setting different icons based on the value of the "type" property. However, after finding a node using something like let node = $('#jstree').jstree(true).get_node('XXXX'), and then modifying both node.type and node.original.type, refreshing the node using $('#jstree').jstree(true).redraw_node(node, true, false, false); doesn't switch the node's icon to the correct icon corresponding to the type. Why is this happening? How can I achieve the icon switching that I need?

TonyXuChen avatar May 28 '25 03:05 TonyXuChen