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

fix(select): don't support binding to select[multiple] #3337

Closed
wants to merge 1 commit into from

Conversation

IgorMinar
Copy link
Contributor

changing the type of select box from single to multiple or the other way around
at runtime is currently not supported and the two-way binding does odd stuff
when such situation happens.

we might eventually support this, but for now we are just going to not allow
binding to select[multiple] to prevent people from relying on something that
doesn't work.

BREAKING CHANGE: binding to select[multiple] directly or via ngMultiple (ng-multiple)
directive is not supported. This feature never worked with two-way data-binding,
so it's not expected that anybody actually depends on it.

Closes #3230

changing the type of select box from single to multiple or the other way around
at runtime is currently not supported and the two-way binding does odd stuff
when such situation happens.

we might eventually support this, but for now we are just going to not allow
binding to select[multiple] to prevent people from relying on something that
doesn't work.

BREAKING CHANGE: binding to select[multiple] directly or via ngMultiple (ng-multiple)
directive is not supported. This feature never worked with two-way data-binding,
so it's not expected that anybody actually depends on it.

Closes angular#3230
@KJTsanaktsidis
Copy link

Can I ask, what problems exactly did my pull request in #3230 not fix? If they're not serious, I'm happy to fix them, this is something that we use.

@IgorMinar
Copy link
Contributor Author

@KJTsanaktsidis how do you use ngMultiple? the binding system breaks down when you use data-binding for <select ng-multiple="isMultiple" ng-model="mySelectModel"> and change isMultiple at runtime. This has never worked, we just never noticed.

@IgorMinar
Copy link
Contributor Author

by breaking down I mean that it's not clear what actually should happen - when multiple the ng-model is an array, for simple select the model is a reference to the value specified via option or ng-options. how do you transition this model in a way that makes sense?

if you want to think about it and work out all the quirks, then please open a new PR.

@IgorMinar
Copy link
Contributor Author

the change in this PR has landed as d87fa00

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.

None yet

2 participants