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

Be able to sort ArrayController by computed property in itemController #4308

Closed
Gaurav0 opened this issue Feb 5, 2014 · 9 comments
Closed

Comments

@Gaurav0
Copy link
Contributor

Gaurav0 commented Feb 5, 2014

Currently, if sortProperties includes a computed property on itemController, that property is not found. You can only sort on properties of the original model.

@stefanpenner
Copy link
Member

@hjdivad we really need to port sortable stuff to array computed...

@LevelbossMike
Copy link
Contributor

@Gaurav0 you can use Ember.computed.sort if you want to sort by properties of itemController.
http://emberjs.jsbin.com/hawa/7/edit

@hjdivad
Copy link
Member

hjdivad commented Feb 8, 2014

@stefanpenner would love to. It's blocked on #4185 in order to support full backwards compatibility.

@hjdivad
Copy link
Member

hjdivad commented Feb 8, 2014

And #4185 is blocked on a decision from core on what to do for backwards compat of existing core macros.

@hjdivad
Copy link
Member

hjdivad commented Feb 8, 2014

@LevelbossMike thanks for the jsbin ^_^

@wagenet
Copy link
Member

wagenet commented Apr 2, 2014

@hjdivad #4185 is closed

@hjdivad
Copy link
Member

hjdivad commented Apr 3, 2014

@wagenet yeah, need to just do this manually in Em.computed.sort now.

@williamli
Copy link

Em.computed.sort will cause a index out of range error at resort ref: #4831

@wagenet
Copy link
Member

wagenet commented Jul 28, 2014

See #5267

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

6 participants