Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

fix(ngOptions): don't duplicate groups with falsy values #14784

Merged
merged 1 commit into from
Jun 15, 2016

Conversation

Narretz
Copy link
Contributor

@Narretz Narretz commented Jun 15, 2016

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
bugfix

What is the current behavior? (You can also link to an open issue here)
see #14781

Please check if the PR fulfills these requirements

This happened when the options were updated, because ngOptions would fail
to remove optgroups with falsy values

Related #14781

@@ -661,7 +661,7 @@ var ngOptionsDirective = ['$compile', '$document', '$parse', function($compile,
listFragment.appendChild(groupElement);

// Update the label on the group element
groupElement.label = option.group;
groupElement.label = option.group === null ? 'null' : option.group;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed for some specific browser? In Chrome that I tried, null seems to be converted to "null" anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes for Safari :|

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Who else? Safari is officially the new IE 😛

@gkalpak
Copy link
Member

gkalpak commented Jun 15, 2016

LGTM

This happened when the options were updated, because ngOptions would fail
to remove optgroups with falsy values

Related angular#14781
@Narretz Narretz force-pushed the fix-ngoptions-duplicate-groups branch from e86934f to cf93847 Compare June 15, 2016 16:55
@Narretz Narretz merged commit 6bc81ae into angular:master Jun 15, 2016
Narretz added a commit that referenced this pull request Jun 16, 2016
Previously, ngOptions would fail to remove optgroups with falsy values when the options were changed / removed.

Related #14781 
PR (#14784)
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.

3 participants