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

GetEntitiesById should maintain sort order based on IDs past in #70

Open
mattbrailsford opened this issue Sep 11, 2018 · 1 comment
Open
Assignees
Labels

Comments

@mattbrailsford
Copy link
Owner

When using the entity picker prop editor, the results are being returned sorted by the sort field, rather than the picked order.

This ultimately comes down to the fact it calls GetEntitiesById which in turn calls GetPaged on the entity repository with a null sort expression. Because of this, the GetPaged method automatically generates a sort expression based on the configured sort property. We should probably make it so that calls to GetEntitiesById maintain the ID sort order.

@mattbrailsford mattbrailsford self-assigned this Sep 11, 2018
@ronaldbarendse
Copy link

Maintaining the passed in order is quite easy, as you'd just have to sort on the index of the IDs, e.g. entities.OrderBy(e => ids.IndexOf(e.Id)).ToList();

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

No branches or pull requests

2 participants