Debounce update

This commit is contained in:
Gabriel Augendre 2023-03-27 17:50:43 +02:00
parent f8e7647af1
commit 2d952e1a63

View file

@ -28,7 +28,7 @@ class BasketForm(forms.ModelForm):
self.helper.add_input(Submit("submit", _("Save"))) self.helper.add_input(Submit("submit", _("Save")))
self.helper.attrs = { self.helper.attrs = {
"hx_post": reverse("purchase:price_preview"), "hx_post": reverse("purchase:price_preview"),
"hx_trigger": "keyup,change", "hx_trigger": "keyup delay:500ms,change delay:500ms",
"hx_target": "#price_preview", "hx_target": "#price_preview",
"hx_swap": "innerHTML", "hx_swap": "innerHTML",
} }