diff options
| author | Julien Mougenot <jum@odoo.com> | 2020-06-04 08:06:08 +0000 |
|---|---|---|
| committer | Mathieu Duckerts-Antoine <dam@odoo.com> | 2020-06-04 19:32:01 +0000 |
| commit | 884ef9f7ee345ab1e940dbf88f4432b7e10f36e3 (patch) | |
| tree | 352bb0a399dafa4691f931e111657b84a495d170 /addons/web/static/src/xml/base.xml | |
| parent | cbdff80157cec3cbff71ea7a41227c9f0d569133 (diff) | |
[REF] web: force dropdown menu icon through getter
Before this ref, the dropdown menu got his icon directly from his props.
This means that any inheriting class had either to define its icon with
the 'default_props' key or to have its parent giving it in the props.
Now, the icon is retrieved from the props via a getter (same as title
and items) and can be overridden to force a fixed icon on the class.
Diffstat (limited to 'addons/web/static/src/xml/base.xml')
| -rw-r--r-- | addons/web/static/src/xml/base.xml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 999e12ebccd..6d71234a6c1 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -160,7 +160,7 @@ t-on-click="state.open = !state.open" t-on-keydown="_onButtonKeydown" > - <i t-if="props.icon" t-att-class="props.icon"/> + <i t-if="icon" t-att-class="icon"/> <span class="o_dropdown_title" t-esc="title"/> <i t-if="displayCaret" t-attf-class="o_dropdown_caret fa fa-caret-{{ state.open ? 'down' : 'right' }}"/> <i t-elif="displayChevron" t-attf-class="fa fa-chevron-{{ state.open ? 'down' : 'right' }} float-right mt4"/> @@ -575,7 +575,7 @@ t-on-keydown="_onFacetKeydown(facet, facet_index)" > <span t-if="facet.title" class="o_searchview_facet_label" t-esc="facet.title"/> - <span t-else="" t-attf-class="o_searchview_facet_label fa {{ facet.icon }}"/> + <span t-else="" t-attf-class="o_searchview_facet_label {{ facet.icon }}"/> <div class="o_facet_values"> <t t-foreach="facet.values" t-as="facetValue" t-key="facetValue_index"> <span t-if="!facetValue_first" class="o_facet_values_sep" t-esc="facet.separator"/> |
