htmx icon indicating copy to clipboard operation
htmx copied to clipboard

Add support for from: modifier on intersect events

Open JanRomero opened this issue 2 years ago • 0 comments

This would allow you to do infinite scroll with better locality of behaviour, by putting the attribs on the list itself:

<ul id="tweets"
    hx-get="/api/moretweetspls/"
    hx-swap="beforeend"
    hx-include="#tweets li:last-child"
    hx-trigger="intersect from:footer"
>

    <div class="tweet">
        <input hidden name="timestamp" value="123456789"/>
    </div>

    <div class="tweet">
        <input hidden name="timestamp" value="123456788"/>
    </div>

</ul>

<footer>mAdE wItH &#10084; In dUdErStaDt</footer>

thx

JanRomero avatar Jun 30 '23 09:06 JanRomero