From 2d952e1a63788afaece00185ecde54c21f30e5b7 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Mon, 27 Mar 2023 17:50:43 +0200 Subject: [PATCH] Debounce update --- src/purchase/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/purchase/forms.py b/src/purchase/forms.py index e529d0b..1b73c08 100644 --- a/src/purchase/forms.py +++ b/src/purchase/forms.py @@ -28,7 +28,7 @@ class BasketForm(forms.ModelForm): self.helper.add_input(Submit("submit", _("Save"))) self.helper.attrs = { "hx_post": reverse("purchase:price_preview"), - "hx_trigger": "keyup,change", + "hx_trigger": "keyup delay:500ms,change delay:500ms", "hx_target": "#price_preview", "hx_swap": "innerHTML", }