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

Object values returns Proxy instead of value #84

Closed
Krzema opened this issue Oct 1, 2020 · 2 comments
Closed

Object values returns Proxy instead of value #84

Krzema opened this issue Oct 1, 2020 · 2 comments

Comments

@Krzema
Copy link

Krzema commented Oct 1, 2020

I'm using ember-changeset package. I'm creating Changeset, which has value as an object - lets say it's:

let user = { value1: {id: 1, text: "test"} };
let changeset = Changeset(user, {});

When I'm using changeset.get("value1") it returns me Proxy instead of object defined in value1. Is it correct behaviour?
In that case, when I'm working with ember-bootstrap and BsForms, element with @controlType=radio is not working propertly, when i pass object and optionLabelPath

@snewcomer
Copy link
Collaborator

It is. We expect, especially for a form, that you will access the leaf keys.

adopted-ember-addons/ember-changeset#549

Could you try user.value1.unwrap() where this is passed into your controls?

@snewcomer
Copy link
Collaborator

closing for now! lmk if you have other questions.

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

No branches or pull requests

2 participants