diff --git a/src/bundle/Resources/views/themes/admin/ui/component/dropdown/dropdown.html.twig b/src/bundle/Resources/views/themes/admin/ui/component/dropdown/dropdown.html.twig index 6ed7168765..42955c4c1e 100644 --- a/src/bundle/Resources/views/themes/admin/ui/component/dropdown/dropdown.html.twig +++ b/src/bundle/Resources/views/themes/admin/ui/component/dropdown/dropdown.html.twig @@ -66,59 +66,61 @@ })|e('html_attr') }}" data-placeholder-template="{{ placeholder_list_item|e('html_attr') }}" > - {% if no_items %} - {% if not is_dynamic %} - {{ placeholder_list_item }} - {% endif %} - {% else %} - {% if value is empty %} - {% if not multiple %} - {% if placeholder is defined and placeholder is not none %} - {% set default_label = 'dropdown.placeholder.all'|trans()|desc('All') %} - - {% include selected_item_template_path with { - value: '', - label: _self.get_translated_label(placeholder, translation_domain)|trim|default(default_label), - } %} - {% else %} - {% set first_choice = choices_flat|first %} - - {% include selected_item_template_path with { - value: first_choice.value, - label: _self.get_translated_label(first_choice.label, translation_domain), - icon: first_choice.icon is defined ? first_choice.icon, - } %} - {% endif %} + {% block selection_info_content %} + {% if no_items %} + {% if not is_dynamic %} + {{ placeholder_list_item }} {% endif %} {% else %} - {% for choice in choices_flat %} - {% if custom_form ? choice.value == value : choice is selectedchoice(value) %} - {% set label = selected_item_label is defined - ? selected_item_label - : _self.get_translated_label(choice.label, translation_domain) - %} + {% if value is empty %} + {% if not multiple %} + {% if placeholder is defined and placeholder is not none %} + {% set default_label = 'dropdown.placeholder.all'|trans()|desc('All') %} - {% include selected_item_template_path with { - label, - value: choice.value, - icon: choice.icon is defined ? choice.icon, - } %} - {% endif %} - {% endfor %} - {% endif %} - {% if multiple %} -