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);
            };
        });
2
  • I am using angularjs ui tree filter from github.com/EE/angular-ui-tree-filter Commented Mar 13, 2015 at 6:26
  • I am having the same problem. did you find the problem? Commented Mar 30, 2015 at 7:33

2 Answers 2

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.

Sign up to request clarification or add additional context in comments.

1 Comment

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 :))
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'];
  });

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.