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 sortMembersBy #6098

Merged
merged 2 commits into from
Jan 20, 2022
Merged

Add sortMembersBy #6098

merged 2 commits into from
Jan 20, 2022

Conversation

nf-s
Copy link
Contributor

@nf-s nf-s commented Jan 19, 2022

Add sortMembersBy to GroupTraits

Fixes #5081

Replaced #4809

Related to #3123

Add sortMembersBy to GroupTraits. This can be set to sort group member models - For example sortMembersBy = "name" will alphabetically sort members by name.

Example

http://ci.terria.io/sort-members-by/#clean&https://gist.githubusercontent.com/nf-s/f55f14d31f80829a968b4c323a462cf1/raw/9acc82eb82c12214336d47b764c16e5b3fbb48f7/sort-members-by.json

{
  "catalog": [
    {
      "type": "wms-group",
      "name": "No sort",
      "url": "proxy/_0d/http://ereeftds.bom.gov.au/ereefs/tds/wms/ereefs/mwq_gridAgg_P1M"
    },
    {
      "type": "wms-group",
      "name": "Sort by name",
      "url": "proxy/_0d/http://ereeftds.bom.gov.au/ereefs/tds/wms/ereefs/mwq_gridAgg_P1M",
      "sortMembersBy": "name"
    },
    {
      "type": "wms-group",
      "name": "Sort by WMS layers",
      "url": "proxy/_0d/http://ereeftds.bom.gov.au/ereefs/tds/wms/ereefs/mwq_gridAgg_P1M",
      "sortMembersBy": "layers"
    }
  ]
}

Checklist

  • There are unit tests to verify my changes are correct or unit tests aren't applicable (if so, write quick reason why unit tests don't exist)
  • I've updated relevant documentation in doc/.
  • I've updated CHANGES.md with what I changed.
  • I've provided instructions in the PR description on how to test this PR.

@nf-s nf-s merged commit 46dd695 into main Jan 20, 2022
@nf-s nf-s deleted the sort-members-by branch January 20, 2022 00:36
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

Successfully merging this pull request may close these issues.

Add group trait to sort group items by name
2 participants