Allow multiple attribute dictionaries #116
gazpachoking
started this conversation in
Ideas
Replies: 1 comment
-
Should be fairly simple to support, put up a draft #117 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I liked the idea in my other thread about datastar of a helper to create the attribute dictionary. #105 (comment) I went all out with this, to get extra type checking and ide autocomplete for datastar attirbutes in a way that can be useful with this library and others. starfederation/datastar#902
The issue I'm having, is with this method, what's the nicest way to include multiple such attributes? Right now I think the union operator is probably the best option, e.g.
div(helperdict()|otherhelperdict())
(Which I actually didn't think of until writing this, and isn't terrible.) My other idea was just to allow any number of attribute dicts, to enablediv(helperdict(), helperdict())
style. Does that seem reasonable or useful? I can write up a PR if so.Beta Was this translation helpful? Give feedback.
All reactions