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

Wrong option removed from select controller #9418

Closed
shahata opened this issue Oct 3, 2014 · 1 comment
Closed

Wrong option removed from select controller #9418

shahata opened this issue Oct 3, 2014 · 1 comment

Comments

@shahata
Copy link
Contributor

shahata commented Oct 3, 2014

Here's a plunkr that reproduces the issue: http://plnkr.co/edit/CZIUHBrqlz7CS93lbZiH?p=preview

Basically, the problem is that the render() removes the wrong option from the select controller since it assumes that the option that was removed has the same label as the excessive option in existingOptions, but this is only correct if the option was popped from the end of the array.

This was introduced in 2bcd02d

I'm looking into how to fix it, but I'd appreciate any suggestions.
/cc @btford

@btford
Copy link
Contributor

btford commented Oct 3, 2014

Grrrr.

Maybe we need separate bookkeeping for options added via ngOptions, and to expose a different API publicly versus privately.

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

Successfully merging a pull request may close this issue.

2 participants