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

Add recursion #24

Closed
jbblanchet opened this issue Nov 28, 2014 · 5 comments
Closed

Add recursion #24

jbblanchet opened this issue Nov 28, 2014 · 5 comments
Assignees

Comments

@jbblanchet
Copy link

I understand that the non-recursion is by design, but I have an use case where it would be pretty useful. In a spa, I'm receiving a complex object from an API, and I want to be able to make it observable quickly. Adding and option to crawl the object recursively would be really helpful. I have a proof of concept working, and the changes appear rather minimal. I can give it a go, but I'd like to make sure that it something that would be considered first.

@jbblanchet jbblanchet mentioned this issue Nov 28, 2014
@archangel-irk
Copy link
Collaborator

Recursive traversal will be added in the near future.

@archangel-irk archangel-irk self-assigned this Dec 15, 2014
@unsafecode
Copy link

+1

@archangel-irk
Copy link
Collaborator

Recursion added bcf8f67

Use:

ko.track( obj, { deep: true } );

fields param:

ko.track(obj, { deep: true, fields: ['prop1', 'prop2'] })

@unsafecode
Copy link

Thanks, wonderful!

@archangel-irk
Copy link
Collaborator

Notice: Selecting of nested fields (e.g. 'prop.nested_prop') are not yet supported. If someone need this feature, please create an issue.

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

3 participants