bland-coat-6833
01/24/2022, 6:30 PMbreezy-finland-10196
01/24/2022, 7:45 PMmysterious-toddler-20573
01/24/2022, 7:54 PMkey property:
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key
something like:
hx-trigger="keyup[key=='Enter']"breezy-finland-10196
01/24/2022, 7:57 PMbreezy-finland-10196
01/24/2022, 7:58 PMmysterious-toddler-20573
01/24/2022, 7:58 PMctrlKey and shiftKey are properties on the keyup eventmysterious-toddler-20573
01/24/2022, 7:59 PMkeybreezy-finland-10196
01/24/2022, 8:00 PMmysterious-toddler-20573
01/24/2022, 8:01 PMaloof-xylophone-31768
01/24/2022, 8:31 PMsalmon-xylophone-28580
01/24/2022, 8:34 PMmysterious-toddler-20573
01/24/2022, 8:37 PMhtml
<form _="on keydown halt" ...>
...
</form>mysterious-toddler-20573
01/24/2022, 8:38 PMadorable-portugal-365
01/24/2022, 8:46 PMmysterious-toddler-20573
01/24/2022, 8:58 PMminiature-controller-37356
01/24/2022, 9:13 PMhtml
<td hx-patch="/xapi/approve/18/"
hx-include="#counters-12, #formset-management"
_="on htmx:configRequest
get detail.triggeringEvent.target.getAttribute('data-action')
then set detail.path to `${detail.path}?id=0&action=${it}`">
<!-- tried this: div hx-disable-->
<span class="fas fa-check" data-action="approve"></span>
<span class="fas fa-times" data-action="reject"></span>
<!--/div-->
</td>mysterious-toddler-20573
01/24/2022, 9:28 PMmysterious-toddler-20573
01/24/2022, 9:28 PMhx-disinherit coming soon 🙂miniature-controller-37356
01/24/2022, 9:34 PMtd content. i know it might not make sense given just this context, but i thought with hx-disable i could turn it off all inherited processingmammoth-family-48524
01/25/2022, 8:32 AMenough-vegetable-95375
01/25/2022, 12:29 PM<div>
<ul>
<li><a hx-get="{% url 'products' %}" hx-target="#list" hx-swap="outerHTML">Products</a></li>
<li><a hx-get="{% url 'prices' %}" hx-target="#list" hx-swap="outerHTML">Prices</a></li>
</ul>
</div>
<div>
<div id="list"></div>
</div>
I'd like to update #list only if the content of the request has changed to avoid replacing the div content everytime I click on the same link. If I use hx-trigger="changed" nothing will happen as the value of the element itself won't have changed. How can I achieve this? I tried a couple of other things digging into the hx-trigger documentation, but none of them worked. Thanks for the awesome work!mysterious-toddler-20573
01/25/2022, 3:04 PMlistNeedsRefresh that is managed by however your state changes. You can then filter on this:
html
<a ... hx-trigger="click[listNeedsRefresh]" ...>...</a>red-tailor-33123
01/25/2022, 3:47 PMmysterious-toddler-20573
01/25/2022, 3:48 PMred-tailor-33123
01/25/2022, 3:50 PMred-tailor-33123
01/25/2022, 3:51 PMred-tailor-33123
01/25/2022, 3:56 PMmysterious-toddler-20573
01/25/2022, 4:35 PMmysterious-toddler-20573
01/25/2022, 4:35 PMred-tailor-33123
01/25/2022, 4:46 PM