Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Fix for filteredItems in async loading data #1464

Closed
wants to merge 3 commits into from

Conversation

ggiovinazzo
Copy link

When loading data in async mode into the directive, if ngModel had already preloaded data, the filter was not applied correctly. This issue was due to behaviour of Array.indexOf prototype method. When comparing arrays of objects, the comparison is made by object reference and always fails.
Switched to angular.isEqual for in depth comparison of objects (this also aids to get rid of $ prefixed variables that angular adds to objects)

ggiovinazzo added 2 commits February 26, 2016 11:12
the already pre-loaded ngModel data is now compared with angular.equals instead of Array.indexOf which caused elements not to be correctly filtered
@ggiovinazzo
Copy link
Author

This issue has been resolved and merged with PR #1473

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

Successfully merging this pull request may close these issues.

1 participant