First version of DataGridQuery. Fixed scrollbar issue
This commit is contained in:
@@ -14,6 +14,7 @@ logger = logging.getLogger("Commands")
|
||||
|
||||
AUTO_SWAP_OOB = "__auto_swap_oob__"
|
||||
|
||||
|
||||
class Command:
|
||||
"""
|
||||
Represents the base command class for defining executable actions.
|
||||
@@ -99,7 +100,7 @@ class Command:
|
||||
def get_key(self):
|
||||
return self._key
|
||||
|
||||
def get_htmx_params(self, escaped=False):
|
||||
def get_htmx_params(self, escaped=False, values_encode=None):
|
||||
res = {
|
||||
"hx-post": f"{ROUTE_ROOT}{Routes.Commands}",
|
||||
"hx-swap": "outerHTML",
|
||||
@@ -120,6 +121,9 @@ class Command:
|
||||
if escaped:
|
||||
res["hx-vals"] = html.escape(json.dumps(res["hx-vals"]))
|
||||
|
||||
if values_encode is "json":
|
||||
res["hx-vals"] = json.dumps(res["hx-vals"])
|
||||
|
||||
return res
|
||||
|
||||
def execute(self, client_response: dict = None):
|
||||
|
||||
Reference in New Issue
Block a user