-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Search (or filter) in jqTree - solved #230
Comments
This looks very useful! |
This is indeed very useful, except when you're filtering on root nodes.. they disappear. I managed to do so by adding an extra class to the main div (#tree) and an extra class to the filtered li's.
Here's an working example: Try filters like: It also disables drag and drop (reordering) when you're in filter mode.
|
Many thanks to both Imaran and FKobus for coming up with a fabulous way to do the filtering. You saved my day! |
Hi guys, when i used dynamic (url) to get data itz not working plz help it's urgent. Instead "Data" we used "dataUrl" in tree and "loadData" as "loadDataFromUrl" in filter |
Hello Vignesh, If you load the data dynamically, then it's possible that you run into timing issues. The reason is that the jsfiddle example uses a timeout of 50 ms. And loading the data from an url could take longer. Perhaps you can load the data initially using ajax: $.getJSON(
url,
function(data) {
$('#TreeView').tree({
data: data
});
// the rest of the code
}
); |
Hi mbraak , Thank you so much for above solution. It worked charm :) |
the filtering above is very slow on larger database |
Hi all,
Using onCreateLi option and loadData function of jqTree, I have implemented a searching mechanism based on what the user types.
Online demo
The same thing, for Romanian readers.
Hope this helps someone.
The text was updated successfully, but these errors were encountered: