#106439TCA selectSingle hides selected item icon when last item does not have an icon configured
Description
Description
For TCA type select the renderType selectSingle can be
configured, which displays the icon of the selected item
next to the field.
In case the last possible select item configured does not
reference an icon, the selected icon display is hidden for
all items, even if they have a valid icon.
Making the display conditional based is a good thing in
general, to hide an empty box when no icons are defined
at all, for example for simple value select lists.
The aforementioned issue boils down to setting an internal
@$hasIcons@ flags looping over all items ending up setting
it to false if the last item does not have an icon, leading
to described behaviour.
It can be safely assumed, that when at least one item defines
an icon the selected icon pane should be display with default
fallback icon, currently defined as using the icon of the first
select item revealing a followup issue having an empty field
when first item does not configure an icon too.
Content element type selection CType is a prominent example
for this:
clipboard-202503261435-rvh8v.png
clipboard-202503261435-ajumb.png