Replies: 3 comments
-
If your goal is to prevent multiple requests at the same time, hx-sync could be a good fit If you really wish to toggle the |
Beta Was this translation helpful? Give feedback.
-
You can also use the loading-states extension <div hx-ext="loading-states">
<button hx-get="/demo" hx-target="#outcome" data-loading-disable>
Click me</button>
<div id="outcome"></div>
</div> See it in action in this codepen |
Beta Was this translation helpful? Give feedback.
-
A bit late but you can try the |
Beta Was this translation helpful? Give feedback.
-
Is there a way to disable a button while a request is still inflight to prevent multiple requests to be fired?
Beta Was this translation helpful? Give feedback.
All reactions