diff --git a/autocomplete/templates/autocomplete/item.html b/autocomplete/templates/autocomplete/item.html index 6c70e06..e14bea0 100644 --- a/autocomplete/templates/autocomplete/item.html +++ b/autocomplete/templates/autocomplete/item.html @@ -12,9 +12,7 @@ hx-include="#{{ component_id }}" hx-vals='{"name": "{{ name|escapejs }}", "component_id": "{{ component_id|escapejs }}", "item": "{{ item.value|escapejs }}"}' hx-swap="outerHTML" - {% if swap_oob %} - hx-swap-oob="outerHTML:#{{ component_id }}__item__{{ item.value|make_id }}" - {% endif %} + {% if swap_oob %} hx-swap-oob="outerHTML:#{{ component_id }}__item__{{ item.value|make_id }}" {% else %} hx-target="this" {% endif %} > {{ item.label|search_highlight:search }} @@ -74,4 +72,4 @@ phac_aspc_autocomplete_trigger_change(document.currentScript.dataset.componentid + '__container'); -{% endif %} \ No newline at end of file +{% endif %}