Problem/Motivation

In some cases there is only one bundle available (perhaps an alter in place). It would be great if the form then just leaves the default parent widget if there is no filtering available.

Steps to reproduce

Easiest way without an alter is just to enable a single bundle.

Proposed resolution

  1. Check bundle count
  2. Revert to no filter if count <= 1

Remaining tasks

MR

User interface changes

Parent widget shown if no filters are available

API changes

N/A

Data model changes

N/A

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

scott_euser created an issue. See original summary.

scott_euser’s picture

Assigned: scott_euser » Unassigned
Status: Active » Needs review

Sorry for the commit guessing! Running a big migration script locally, didn't want to interrupt it with ddev router. This is now ready for review + has test coverage.

If only a single bundle is selected, the widget reverts to the default Core autocomplete. In addition to responding to any sort of alter, this has the additional benefit of making it easier to convert an existing site because autocomplete filters can just default to this widget with a sort of find and replace in form display config.

dahousecat’s picture

Great suggestion for improvement and good implementation.
Approved and merged.

scott_euser’s picture

Status: Needs review » Fixed

Great thank you!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.