Currently when using the dynamic_entity_reference_options_select widget, the options are shown in optgroups.

Patch attached only shows the items in optgroups when there are multiple target_bundles available.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

JeroenT created an issue. See original summary.

JeroenT’s picture

Status: Active » Needs review
FileSize
870 bytes

Currently when using the dynamic_entity_reference_options_select widget, the options are shown in optgroups.

Patch attached only shows the items in optgroups when there are multiple target_bundles available.

JeroenT’s picture

Issue summary: View changes
jibran’s picture

Can you please add screenshots for this and some quick test?

JeroenT’s picture

Issue tags: +Need tests
FileSize
13.57 KB
12.29 KB

Attached is a before and after screenshot.

jibran’s picture

Status: Needs review » Needs work

Thanks for the screenshots. These look awesome. Let's add some tests and finish it.

JeroenT’s picture

The last submitted patch, 7: disable_optgroup_in-2829602-7-test-only.patch, failed testing.

jibran’s picture

Status: Needs review » Reviewed & tested by the community

This is ready.

jibran’s picture

Awesome work with the tests. Thank you!

  • jibran committed 359e650 on 8.x-2.x authored by JeroenT
    Issue #2829602 by JeroenT: Disable optgroup in select list when only 1...
jibran’s picture

Status: Reviewed & tested by the community » Fixed

Pushed to 8.x-1.x

  • jibran committed fd781f1 on 8.x-1.x authored by JeroenT
    Issue #2829602 by JeroenT: Disable optgroup in select list when only 1...

  • jibran committed be7ef19 on 8.x-1.x
    Issue #2829602 by jibran: PHPCS fixes.
    

Status: Fixed » Closed (fixed)

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