Sort values by weight if referencing a Taxonomy

Created on 12 March 2019, over 5 years ago
Updated 13 April 2023, about 1 year ago

Problem/Motivation

When adding a exposed filter on a taxonomy reference field, the taxonomy's values are sorted by their weight values.
But when using a VERF filter instead, the values are sorted alphabetically.

Proposed resolution

Check if the field references a taxonomy, and sort the values by weight in that case. Otherwise, stay with the alphabetic sort.

User interface changes

None.

API changes

None.

Data model changes

None.

✨ Feature request
Status

Needs review

Version

1.0

Component

User interface

Created by

πŸ‡©πŸ‡ͺGermany mrshowerman Munich

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¦πŸ‡ΊAustralia imclean Tasmania

    This looks like a good idea, but I wonder if it could be made more generic? Such as providing an option to sort by weight whenever there is a weight field, or any other field on the referenced entity.

    Alternatively, being able to sort by another view could take handle most use cases. For example, we're using draggable views β†’ to arrange referenced entities in an arbitrary order. This works with both lists and entity reference fields but not Views Entity Reference Filters.

Production build 0.69.0 2024