search fail after refresh #2808
Unanswered
mtiraferri
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hallo, just new to jstrre.
I'm using jstree with json data from mysql table.
If i add a record in the table, i can use the refresh method to have the new node in to the tree.
then i can use the search method to find the new node and get an alert:
$('#ajaxDati').on('search.jstree', function(e, data) { if (data.res.length == 0) { alert("not found") } else { alert("FOUND!") } });If i use both the methods in the same js function, to find the new node (or to fine an existing node) the search always fail!
$('#ajaxDati').jstree("refresh"); var stringa = "test"; $("#ajaxDati").jstree("search",stringa)But the search fail!!
// $('#ajaxDati').jstree("refresh"); var stringa = "test"; $("#ajaxDati").jstree("search",stringa)If i omit the refresh call the search succed.
Sure i'm doing something wrong, hope in some help.
Thankyou,
Marco.
Beta Was this translation helpful? Give feedback.
All reactions