Skip to content
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

Filtering problem when grouped #570

Open
cschwaderer opened this issue Apr 4, 2019 · 0 comments
Open

Filtering problem when grouped #570

cschwaderer opened this issue Apr 4, 2019 · 0 comments

Comments

@cschwaderer
Copy link

I've found a problem for filtering/searching multi-level grouped input models, so, I changed the if condition in line 182/183

 if ( typeof $scope.filteredModel[ $scope.filteredModel.length - 1 ][ attrs.groupProperty ] !== 'undefined'
                            && $scope.filteredModel[ $scope.filteredModel.length - 1 ][ attrs.groupProperty ] === false )

into

if (
                           (
                               !$scope.filteredModel[ $scope.filteredModel.length - 1 ]
                               ||
                               typeof $scope.filteredModel[ $scope.filteredModel.length - 1 ][ attrs.groupProperty ] !== 'undefined'
                           )
                           &&
                           (
                               !$scope.filteredModel[ $scope.filteredModel.length - 1 ]
                               ||
                               $scope.filteredModel[ $scope.filteredModel.length - 1 ][ attrs.groupProperty ] === false
                           )

That solved the problem for me.
I don't see a point in creating a PR, since it seems they are not eagerly pulled right now anyway. However, feel free the use the fix wherever you want!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant