1

Angularjs UI tree filtering feature is not working at child level however it is working fine at group level. For example if we type node1 or node2 filtering works fine, but if we type node1.2 or node2.1, filtering won't work properly. Please find plnkr

If I add the following code to my script.js file everything is scrapping out. So I have commented that part.

angular.module('folderApp', ['ui.tree',  'ui.tree-filter',  'ui.highlight'])
 .filter('trust', function ($sce) {
            return function (val) {
                return $sce.trustAsHtml(val);
            };
        });
Madasu K
  • 1,813
  • 2
  • 38
  • 72

2 Answers2

2

In your data structure try to use items, it is by default in ui tree filter. For example in above plunker, instead nodes in the data structure, use items. It solves the problem. If you want to use any other name instead 'items' then you need to configure it.

Madasu K
  • 1,813
  • 2
  • 38
  • 72
  • UNBELIEVABLE! it works. This is so ridiculous, I don't know what to do, laugh or cry. Wasted a day on this. Not even sure what to do, upvote your answer or downvote the filter :)) – bokkie Mar 30 '15 at 13:08
0

I had the same problem, you need to use items or just change descendantCollection setting like this:

angular.module('myApp')
  .config(function (uiTreeFilterSettingsProvider) {
    uiTreeFilterSettingsProvider.descendantCollection = ['childs'];
  });
Kamil
  • 59
  • 6