-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
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?