Skip to content

Commit

Permalink
IBX-5635: [Payments] Missing placeholder after removing all items fro…
Browse files Browse the repository at this point in the history
…m the filter (#771)
  • Loading branch information
GrabowskiM authored Apr 27, 2023
1 parent 40c1325 commit e64e105
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/bundle/Resources/public/scss/_dropdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
cursor: pointer;
display: flex;
align-items: center;
flex-wrap: wrap;
flex-wrap: nowrap;
margin-bottom: 0;
transition: all $ibexa-admin-transition-duration $ibexa-admin-transition;

Expand Down Expand Up @@ -426,7 +426,7 @@
&--overflow {
.ibexa-dropdown {
&__selected-item {
max-width: calc(100% - #{calculateRem(96px)});
max-width: calc(100% - #{calculateRem(40px)});
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,7 @@
{% endif %}
{% else %}
{% if value is empty %}
{% if multiple %}
<li class="ibexa-dropdown__selected-item ibexa-dropdown__selected-item--predefined ibexa-dropdown__selected-placeholder">
{% if placeholder is defined and placeholder is not none %}
{{ _self.get_translated_label(placeholder, translation_domain )}}
{% else %}
{{ 'dropdown.placeholder'|trans|desc("Choose an option") }}
{% endif %}
</li>
{% else %}
{% if not multiple %}
{% if placeholder is defined and placeholder is not none %}
{% set default_label = 'dropdown.placeholder'|trans()|desc('Choose an option') %}

Expand Down Expand Up @@ -109,6 +101,18 @@
{% endif %}
{% endfor %}
{% endif %}
{% if multiple %}
<li
class="ibexa-dropdown__selected-item ibexa-dropdown__selected-item--predefined ibexa-dropdown__selected-placeholder"
{% if value is empty %}hidden{% endif %}
>
{% if placeholder is defined and placeholder is not none %}
{{ _self.get_translated_label(placeholder, translation_domain )}}
{% else %}
{{ 'dropdown.placeholder'|trans|desc("Choose an option") }}
{% endif %}
</li>
{% endif %}
{% endif %}

<li class="ibexa-dropdown__selected-item ibexa-dropdown__selected-item--predefined ibexa-dropdown__selected-overflow-number" hidden></li>
Expand Down

0 comments on commit e64e105

Please sign in to comment.