vakata / jstree

jquery tree plugin
http://jstree.com
MIT License
5.15k stars 1.38k forks source link

BUG: delete node is not removed from get_checked array #2646

Closed kpetrow closed 1 year ago

kpetrow commented 2 years ago

fiddle: fiddle

After deleting a node it is still in get checked array as false. This means if you delete and then need to check if more than one node is checked, one needs to iterate over checked array and remove false's

inst.get_checked(true).length ; // this is x
inst.check_node('2');
inst.delete_node('2');
inst.get_checked(true).length ; // this is x+1 should be x