Skip to content

Conversation

@JanRomero
Copy link

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>

Testing

A new test is included in this PR. Unfortunately it's manual. The other tests pass.
I've also added a line about the modifier to the docs.

Checklist

  • I have read the contribution guidelines
  • I have targeted this PR against the correct branch (master for website changes, dev for
    source changes)
  • This is either a bugfix, a documentation update, or a new feature that has been explicitly
    approved via an issue
  • I ran the test suite locally (npm run test) and verified that it succeeded

thx

@Telroshan Telroshan added the enhancement New feature or request label Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants