Open hasansezertasan opened 9 months ago
WDYT about this @jowilf?
I did some work on it, you can find it at hasansezertasan/starlette-admin/tree/html_params. I've been hesitating about opening PR for a while. I would be very happy if you review it and I would like to open PR if you deem it appropriate.
Also, if I pass the hyperscript attributes ({"_": "statement"}
), the html_params
function turns the underscores into dashes, so it's still not working for the hyperscript library.
Take a look at the hyperscript usage: ///_hyperscript
Is your feature request related to a problem? Please describe. As HTMX rises, we see many new libraries based on HTML attributes like AlpineJS and Hyperscript.
I am using HTMX, AlpineJS, and Hyperscript in my projects now and these libraries mostly rely on HTML attributes, so to use them properly I have to override each
Field
and addhtml_params
class attribute.Describe the solution you'd like I don't know if I'm asking too much but what about adding that
html_params
attribute to theBaseField
class and updatinginput_params
methods?Additional context I believe in the end, this feature will be in demand.