Open
Description
Is currently a way to filter in controller?
I am doing it this way for the moment:
function treeSearch() {
// I tried using angular.copy instead of this method
// to reset the data but it doesn't work
on_treeData_change();
var results = $filter('searchFor')(scope.tree_rows, scope.queryString, scope.expandingProperty, scope.colDefinitions, true);
$timeout(function () {
scope.tree_rows = results;
});
}
The problem I have with this solution is if I expand or collapse a filtered object it expands all nodes from original tree. It should expand filtered nodes
The weird is ng-click only do this
row.branch.expanded = !row.branch.expanded
This was my original template
<tr ng-repeat="row in tree_rows | searchFor:$parent.filterString:expandingProperty:colDefinitions:true track by row.branch.uid"
But with this solution I can't expand or collapse nodes because it is filtering all the time
If there is a way to do it I will appreciate any hint
Metadata
Metadata
Assignees
Labels
No labels