diff --git a/inventory/templates/fragments/_combobox_fragment.html b/inventory/templates/fragments/_combobox_fragment.html
index 5bf940c..5c2e7db 100644
--- a/inventory/templates/fragments/_combobox_fragment.html
+++ b/inventory/templates/fragments/_combobox_fragment.html
@@ -77,8 +77,10 @@ create_url = none, edit_url = none, delete_url = none, refresh_url = none
{% if refresh_url %}
-
+ {% set url = refresh_url ~ ('&' if '?' in refresh_url else '?') ~ 'view=option' %}
+
+
{% endif %}
{% endmacro %}
\ No newline at end of file
diff --git a/inventory/templates/fragments/_option_fragment.html b/inventory/templates/fragments/_option_fragment.html
index 600edc5..bc25b57 100644
--- a/inventory/templates/fragments/_option_fragment.html
+++ b/inventory/templates/fragments/_option_fragment.html
@@ -1,6 +1,7 @@
-{% for option in options %}
-
-{% endfor %}
\ No newline at end of file
+{# templates/fragments/_option_fragment.html #}
+{% for it in options %}
+
+{% endfor %}
diff --git a/inventory/templates/playground.html b/inventory/templates/playground.html
index af45727..d0b8764 100644
--- a/inventory/templates/playground.html
+++ b/inventory/templates/playground.html
@@ -4,6 +4,6 @@
{{ combos.dynamic_combobox(
id='play',
label='Breakfast!',
- refresh_url=url_for('ui.list_items', model_name='brand', view='option')
+ refresh_url=url_for('ui.list_items', model_name='brand')
) }}
{% endblock %}
\ No newline at end of file
diff --git a/inventory/ui/blueprint.py b/inventory/ui/blueprint.py
index adea7e8..51781c0 100644
--- a/inventory/ui/blueprint.py
+++ b/inventory/ui/blueprint.py
@@ -53,6 +53,7 @@ def list_items(model_name):
items = [call(Model, 'ui_serialize', r, view=view) or default_serialize(Model, r, view=view)
for r in rows]
- if view=="option":
- return render_template('fragments/_option_fragment.html', options=items)
+ want_html = (request.args.get("view") == "option") or ("HX-Request" in request.headers)
+ if want_html:
+ return render_template("fragments/_option_fragment.html", options=items)
return jsonify({"items": items})