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

fix(uiSelectChoices): prevent template element from being modified #1850

Merged
merged 2 commits into from
Nov 21, 2016

Conversation

zollinger
Copy link
Contributor

Previously, the .ui-select-choices-row element got deleted whenever the linked scope got destroyed which prevents rendering of the options in some cases.

Previously, the .ui-select-choices-row element got deleted whenever the linked scope got destroyed which prevents rendering of the options in some cases.
@user378230
Copy link
Contributor

@zollinger I'm going assume this is in reference to #1365?

I need one of you to open an issue with a Repro just to confirm there is a problem and this does resolve it, before I go ahead and merge. (Up until no one else has reported this problem and there have been many versions since the changes - so I just want to be sure this is good to merge).

@zollinger
Copy link
Contributor Author

I added a second commit which prevents tElement from leaking to the link function scope.

@user378230
Copy link
Contributor

user378230 commented Nov 18, 2016

@zollinger I was thinking to ask you to do that. Thanks very much!

Just before I merge is there anyway we can add a test for this?

@zollinger
Copy link
Contributor Author

I'm not entirely sure what to test here. Adding and removing elements to the DOM is the job of AngularJS, so I we should do or test that here. Then the second change is about working with the linked element in link phase, which is obvious.

@user378230 user378230 merged commit 7aabdc4 into angular-ui:master Nov 21, 2016
kboga pushed a commit to kboga/ui-select that referenced this pull request Nov 29, 2016
…ngular-ui#1850)

* fix(uiSelectChoices): prevent template element from being modified

Previously, the .ui-select-choices-row element got deleted whenever the linked scope got destroyed which prevents rendering of the options in some cases.

* fix(uiSelectChoicesDirective): use element reference instead of template element in link function

Closes angular-ui#1851
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.

2 participants