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

Column sorting #42

Open
knownasilya opened this issue Oct 28, 2014 · 7 comments
Open

Column sorting #42

knownasilya opened this issue Oct 28, 2014 · 7 comments

Comments

@knownasilya
Copy link
Contributor

@bcardarella would you accept a PR that adds column sorting functionality?

@bcardarella
Copy link
Member

@knownasilya maybe, tell me more

@knownasilya
Copy link
Contributor Author

Basically a sort on a single column only, so clicking a column name will make it ascending (or descending by default) with some kind of font character representing up/down. If you click on the column name again it would toggle the sorting between the two. Clicking on another column would sort by that column, and remove sort from previous column.

Default sort would be by id in ascending order (I think that's the order currently).

@bcardarella
Copy link
Member

I like it, but I think this is best for a plugin. I actually want to remove the search capability out of this module and move to a plugin for people to add. My reasoning is to keep ember-admin as thin as possible so those using and augmenting don't have to opt-into code they might not necessarily use.

@knownasilya
Copy link
Contributor Author

I guess the question is how do we add a hook to be able to make a plugin of the sort?

@bcardarella
Copy link
Member

Confirm. I'll give this some thought as it is may require some upstream changes in ember-cli itself to pull off properly. Off-hand I think ember-admin's base templates should include some named outlets that are unused but can be put to use by certain plugins. I am OK with including named outlets for specific functionality, like {{outlet search}} and {{outlet sort}} if that is the extend of the API surface in ember-admin. Then it would be up to external plugins to make use of those outlets and inject themselves into the correct ember-admin internals.

@Andrew-Max
Copy link

👍

Also, for what it's worth, I',m having a hard time imagining a situation where you have large tables of data that you wouldn't want to sort by column

@knownasilya
Copy link
Contributor Author

Looking forward to ember-engines being utilized here so plugins are super easy.

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

3 participants