Extend inline definitions #4666
-
First, I just had inline definitions and additional external bindings, but the external were overwriting the inline defitions. So I tried to extend the inline definitions with a data definition but it did not work. Is there another/better way to do this? As an example, this would be the html tag and the js code: HTML Tag AlpineJS Code
Additional issueWhen I click on a link, and navigate back, the page is loaded from the cache, and the link is still disabled. I currently need to listen to |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 11 replies
-
This is what I'm currently doing, but I consider it suboptimal:
|
Beta Was this translation helpful? Give feedback.
-
Full example explainedAh, OK. Let me give you my current full length example. This is how I currently implemented it. It works, but it is not ideal, since the inline possibilites are very limited that way. I can't use
Here the Why I need this additional/generic functionalityI need to give the user feedback that the link has been clicked and reduce possible unnecessary network traffic by disallowing multiple clicks (which is the natural user response when something does not react within ~600ms). Does this make sense? |
Beta Was this translation helpful? Give feedback.
-
Yes, you are right about losing reactiveness - but in that case, it's OK (it does not change anymore). OK, here we go: https://awesomealpine.com/play?share=qtEs4lIKJdwP - does this help? |
Beta Was this translation helpful? Give feedback.
-
Okay, I get it now...yeah, its not straightforward, but https://awesomealpine.com/play?share=WCF7bC9r3S_B does work |
Beta Was this translation helpful? Give feedback.
Okay, I get it now...yeah, its not straightforward, but https://awesomealpine.com/play?share=WCF7bC9r3S_B does work