Leverage views grouping for entityreference selection widget

Created on 20 January 2021, over 3 years ago
Updated 4 May 2023, about 1 year ago

Problem/Motivation

As a sitebuilder, i want to use views grouping to have optgroups in the entityreference selection widget.

(Currently, entities are always grouped by bundle, not confiogurable.)

Proposed resolution

Add "group by field" option to views handler and use it in \Drupal\views\Plugin\EntityReferenceSelection\ViewsSelection::stripAdminAndAnchorTagsFromResults.

Remaining tasks

Update branch
Add test coverage
Code review

User interface changes

New option in views handler.

API changes

Probably none.

Data model changes

Probably none.

Release notes snippet

Views grouping is now available for the entityreference views selection handler.

✨ Feature request
Status

Needs work

Version

10.1 ✨

Component
ViewsΒ  β†’

Last updated 1 minute ago

Created by

πŸ‡©πŸ‡ͺGermany geek-merlin Freiburg, Germany

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

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.

Production build 0.69.0 2024