Problem/Motivation

anyLabel is set up even if there is only one element in the list.

Steps to reproduce

Have a list in the filter with only one element.

Proposed resolution

Add condition in WidgetView.js to set antLabel only if we more than one element.

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#12 none_option_missing.png49.07 KBmkindred

Issue fork shs-3254384

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

nassaz created an issue. See original summary.

nasser_’s picture

stBorchert made their first commit to this issue’s fork.

  • stBorchert committed e0847eb on 2.0.x authored by nassaz
    Issue #3254384: anyLabel is set up even if there is only one element in...
stborchert’s picture

Thanks for this simple but effective fix. Merged!

stborchert’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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

mkindred’s picture

Was this fix mainly for use in views? I'm finding that hiding the - None - option for a single child term is confusing when it's a field. If you don't require the deepest level, and you accidentally select the single child term, you cannot deselect it.

Only local images are allowed.

The workaround is to select - None - for the parent, and then re-selecting the parent. But this is confusing to my users.

mkindred’s picture

StatusFileSize
new49.07 KB

Evidently I had trouble with the image upload:

none option missing

nelo_drup’s picture

#4 Same problem I hope it will be solved and also the -any- option is shown at the end of the options in some cases in the hierarchy the -none- or -any- option does not appear either

My version is:
- Drupal 9.5.5
- PHP 8.1
- MySQL 5.37