diff --git a/app/templates/_layout.html b/app/templates/_layout.html index cab58e9..b714c67 100644 --- a/app/templates/_layout.html +++ b/app/templates/_layout.html @@ -227,6 +227,14 @@ } }); + // Auto-submit forms when inputs change + document.addEventListener('change', (e) => { + const htmxForm = e.target.closest('form[hx-get], form[hx-post]'); + if (htmxForm) { + htmxForm.dispatchEvent(new Event('submit', { cancelable: true, bubbles: true })); + } + }); + // Handle form submissions for Micro-HTMX document.addEventListener('submit', async (e) => { const htmxForm = e.target.closest('form[hx-get], form[hx-post]'); diff --git a/app/templates/partials/dashboard_graph.html b/app/templates/partials/dashboard_graph.html index fbefec4..d8af6bf 100644 --- a/app/templates/partials/dashboard_graph.html +++ b/app/templates/partials/dashboard_graph.html @@ -29,14 +29,6 @@ - - -