-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not sure if bug or feature #4
Comments
The second option should always work - I'll do some reviews to verify though (and see what might be happening in the first example) 🙂 |
@JohnathonKoster thanks a lot! On another note, this also does not work inside an antlers file: <x-input
type="{input_type ?? 'text'}"
name="{handle}"
value="{value}"
{{ js_attributes }}
/>
Am I missing anything? Thanks again. |
I don't think parameters like that ( |
@JohnathonKoster Ah sorry, I guess I hit some edge cases while tinkering. No worries though, I love the package so far! Copy-pasting |
I've tagged version 2.1.0, which makes a few improvements here 🙂 The following will now compile to equivalent Antlers code behind the scenes: <x-button @click="{{ handle }}++">
Submit
</x-button>
<x-button @click="{handle}++">
Submit
</x-button> In addition to that improvement, I've also added support for compiling arbitrary variable echos like this: <x-input
type="{input_type ?? 'text'}"
name="{handle}"
value="{value}"
{{ js_attributes }}
/> The previous example would be equivalent to the following in regular Antlers: {{ tag_name :js_attributes="js_attributes" }} If the input is more complicated like so: <x-input
type="{input_type ?? 'text'}"
name="{handle}"
value="{value}"
{{ js_attributes | upper }}
/> it is equivalent to the following: {{ tag_name js_attributes="{js_attributes | upper}" }} |
@JohnathonKoster thanks a lot 🍻 |
Hey John, as always love your work!
We use this package heavily with our sites and just recently stumbled upon a thing but I am not sure if it's a bug or a feature.
I am trying to set the value of an alpine data based on the handle. In this case, the
handle
is theantlers
value that I am trying to increase or decrease.A blade component inside an antlers file for example:
field.antlers.html
This will not work and the attribute is not evaluated at all. However, this does work:
Is it okay if we keep using the second option? Or do you think its a bug and the first one should work.
Thanks!
The text was updated successfully, but these errors were encountered: