maxazan / jquery-treegrid

TreeGrid plugin for jQuery
http://maxazan.github.io/jquery-treegrid
MIT License
553 stars 222 forks source link

The performance of operations expand, collapse improved; Support of interactive tree filter #52

Open DmitriyShiryaev opened 8 years ago

DmitriyShiryaev commented 8 years ago

The performance of operations expand, collapse improved

There was a low performance in case the tree have many nodes, 1500 for example. This patch fixes it. Cookies functionality was not tested.

Support of interactive tree filter

This patch allows the user filter the tree branches by string. Filtered tree shows the nodes matched filter string and all its ancestors and all its descendants. Expand/collapse functions work on filtered tree. Cookies functionality was not tested

Interfaces

Apply filter

Format: $('<the tree selector>').treegrid('filter', '<filter string>'); Example: $('#pt-file-tree').treegrid('filter', 'cpp');

Cancel filter

Format: $('<the tree selector>').treegrid('filter', ''); Example: $('#pt-file-tree').treegrid('filter', '');

Set the filter on initialization (not tested)

Format: $('<the tree selector>').treegrid({filter: '<filter string>'}); Example: $('.pt-file-tree').treegrid({filter: 'cpp'});