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

Clearing the selection sets model value to 'undefined' #863

Closed
mirow opened this issue Apr 17, 2015 · 5 comments
Closed

Clearing the selection sets model value to 'undefined' #863

mirow opened this issue Apr 17, 2015 · 5 comments

Comments

@mirow
Copy link

mirow commented Apr 17, 2015

Clearing the selection in a non-multiselect which has the "allow-clear" attribute sets the model value to undefined, while the expected value would be null.

Being undefined causes Angular to ignore the change, so it won't be sent to the server.

@arathael
Copy link

+1
Doing a manual checkup before submit to correct this..

@maxavi
Copy link

maxavi commented Dec 29, 2015

+1

@igler
Copy link

igler commented Apr 6, 2016

+1

@user378230
Copy link
Contributor

Please do not +1 it creates unnecessary noise in issues, use github reactions.


This looks like a small change, it could probably be fixed in a quick PR with associated unit test. Instead of +1'ing consider submitting a PR! 😃

jrbotros pushed a commit to jrbotros/ui-select that referenced this issue Apr 5, 2017
jrbotros pushed a commit to jrbotros/ui-select that referenced this issue Apr 5, 2017
jrbotros pushed a commit to jrbotros/ui-select that referenced this issue Apr 5, 2017
jrbotros pushed a commit to jrbotros/ui-select that referenced this issue Apr 5, 2017
jrbotros pushed a commit to jrbotros/ui-select that referenced this issue Apr 5, 2017
jrbotros pushed a commit to jrbotros/ui-select that referenced this issue Apr 5, 2017
@zuzusik
Copy link

zuzusik commented Apr 19, 2017

BTW, the fix for this broke code for those waiting for undefined here.

This was definitely a breaking change and should have been released in new major version...

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.

7 participants