Only inputs react on binding

This commit is contained in:
2025-11-02 10:35:06 +01:00
parent c3d6958c1a
commit 7553c28f8e
2 changed files with 47 additions and 3 deletions

View File

@@ -38,9 +38,10 @@ class mk:
@staticmethod
def manage_binding(ft, binding: Binding):
if binding:
# update the component to post on the correct route
htmx = binding.get_htmx_params()
ft.attrs |= htmx
if ft.tag in ["input"]:
# update the component to post on the correct route input and forms only
htmx = binding.get_htmx_params()
ft.attrs |= htmx
# update the binding with the ft
ft_attr = binding.ft_attr or get_default_ft_attr(ft)