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

Track groups by their name - Fix issue #1721 #1722

Merged
merged 1 commit into from
Jul 15, 2016

Conversation

alexbrad
Copy link
Contributor

By using "track by", existing items don't have to be re-rendered when the array changes.

@user378230
Copy link
Contributor

Have you confirmed this improves performance issues mentioned in #1721?

@alexbrad
Copy link
Contributor Author

Without it, any scope created inside a ui-select-choice gets destroyed whenever the array changes (I checked it by listening for the $destroy event). If you add "track by $group.name", this no longer happens, unless the item is actually removed from the array.

@user378230
Copy link
Contributor

Ok I'll trust you! 😃

The commit message needs to match our format as per CONTRIBUTING.mdif you can do this great else will have to wait till I can spare a moment.

Use "track by" to track groups of choices by their name instead of
the $$hastKey. This way, existing items don't have to be
re-rendered when the array of items changes.

Closes angular-ui#1721
@alexbrad
Copy link
Contributor Author

Updated the commit message.

@user378230 user378230 merged commit 1770038 into angular-ui:master Jul 15, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants