I am testing my UI behavior and I am trying to click on a jstree node programmatically:
$('#search_jstree_id')
.jstree(true)
.select_node('nodeName');
But the nodeName comes from users search and it is not exact match with the existing nodes, so I want to use a regular expression in .select_node. I can not make it work. Is it possible? Any other way for jstree?
Not really a regular expression, but you can use a CSS selector, like:
...where
selectoris the user input. It will match nodes which have anidthat contains the provided string. So for example ifselector = 'can'then it could match nodescandleandscanned, but notclan.