JQuery JSTree onsearch callback

JQuery JSTree onsearch callback

Hi,

I have an issue with the onsearch callback functionality in jquery jstree.
There is a search option to search down the nodes in the tree.
The first time the tree is rendered, if I type in something on the search filter, it is not calling the callback for the onsearch event.
But once i manually expand or collapse any of the tree nodes, and then do a search, now the callback for onsearch gets triggered.

Any idea of why the callback is not getting triggered in the first attempt?
Your help is much appreciated.

Thanks and Regards,
Rajesh.