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 projections for observables and computeds that contain array #24

Open
blazkovicz opened this issue Sep 4, 2014 · 2 comments
Open

Comments

@blazkovicz
Copy link

usage example:

var items = ko.computed(function () { return [1,2,3,4,5,6]; });
// now I can not write next:
var selectedItems = items.filter(function (item) { return item > 3; });
@blazkovicz blazkovicz changed the title Use projections with computed that return array Need ability to use projections with computed arrays Sep 4, 2014
@blazkovicz blazkovicz changed the title Need ability to use projections with computed arrays Extend projected arrays with same map and filter methods Sep 5, 2014
@lieut-data
Copy link

I don't think your example captures what you're actually after. Chaining works just fine with projected arrays.

Perhaps you're asking for the ability to chain off of a computed that returns an array? I'd love the same functionality, myself.

@blazkovicz
Copy link
Author

Yes, you're right, I was misleaded by rebinding on the page, so actually I need projections for observables and computeds that contain array too.

@blazkovicz blazkovicz changed the title Extend projected arrays with same map and filter methods Add projections for observables and computeds that contain array Sep 16, 2014
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