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

GridFieldOrderableRows does not support secondary or default sort fields. #324

Closed
davejtoews opened this issue Aug 24, 2021 · 1 comment
Closed

Comments

@davejtoews
Copy link
Contributor

davejtoews commented Aug 24, 2021

I frequently have orderable objects which should have a default sort order, but option for manually overriding. So the object will have something like:

private static $default_sort = 'Sort ASC, Title ASC`;

With the GridFieldOrderableRows component added, only the sort column managed by the component itself is considered in the CMS display of the items. If no values have been set in the sort field they display unsorted in whichever order SQL decides to show them. (Mostly just ordered by id).

The component offers a getter and setter for $extraSortFields but these are applied as higher priority sorts than the managed sort column. What I'm looking for is setting sorts with a lower priority than the managed sort column, preferably making use of the defaults set elsewhere.

PRs

@GuySartorelli
Copy link
Collaborator

Closing as a duplicate of #357 (we took the latter through backlog refinement today)

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

Successfully merging a pull request may close this issue.

3 participants