Adding search control

This commit is contained in:
2025-11-15 23:49:37 +01:00
parent 5ee671c6df
commit 09c4217cb6
4 changed files with 69 additions and 4 deletions

View File

@@ -44,7 +44,7 @@ class BaseCommand:
def execute(self, client_response: dict = None):
raise NotImplementedError
def htmx(self, target="this", swap="innerHTML"):
def htmx(self, target="this", swap="innerHTML", trigger=None):
if target is None:
self._htmx_extra["hx-swap"] = "none"
elif target != "this":
@@ -54,6 +54,10 @@ class BaseCommand:
self._htmx_extra["hx-swap"] = "none"
elif swap != "innerHTML":
self._htmx_extra["hx-swap"] = swap
if trigger is not None:
self._htmx_extra["hx-trigger"] = trigger
return self
def bind_ft(self, ft):