Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extraneous properties added to object values #165

Closed
rdicroce opened this issue Dec 13, 2017 · 1 comment
Closed

Extraneous properties added to object values #165

rdicroce opened this issue Dec 13, 2017 · 1 comment
Assignees

Comments

@rdicroce
Copy link

Expected behaviour

I have a ng-select set up where the ngModel is the whole object, and bindLabel is set so the label is a string within the object. When I select a value, the object emitted by ngModelChange should exactly match the object I provided as part of the items list.

Actual behaviour

The value emitted by ngModelChange contains extra unwanted properties like "index" and "selected".

More Info

ng-select version: 0.12.0

browser: FF 57

reproducible in demo page: Yes. Go to "Filter and autocomplete". Under "Default search", select any name from the list and you'll see that extra properties are added. "Custom search" also demonstrates the problem, as the initial value when the page loads doesn't have the extra properties, but then as soon as you do something to either input (even just focusing the field), the extra properties are added.

@varnastadeus varnastadeus self-assigned this Dec 13, 2017
@varnastadeus
Copy link
Member

Hi, yes, it is known issue and will be fixed with #159

@varnastadeus varnastadeus added this to the Version 1.0.0 milestone Dec 15, 2017
jakemdunn pushed a commit to jakemdunn/ng-select that referenced this issue Oct 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants