Adding search control
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user