https://htmx.org logo
Join Discord
Powered by
# htmx-general
  • b

    blue-gold-89534

    10/15/2022, 11:10 PM
    I want to create somewhat of a live list
  • m

    mysterious-toddler-20573

    10/15/2022, 11:10 PM
    that also infinite scrolls
  • m

    mysterious-toddler-20573

    10/15/2022, 11:11 PM
    so the existing elements should update
  • m

    mysterious-toddler-20573

    10/15/2022, 11:11 PM
    but scrolling should work too
  • m

    mysterious-toddler-20573

    10/15/2022, 11:11 PM
    interesting, I will need to think
  • m

    mysterious-toddler-20573

    10/15/2022, 11:12 PM
    it seems like you could have each page refresh pretty easily, if you can switch from a table to divs
  • g

    gorgeous-airport-54386

    10/15/2022, 11:12 PM
    maybe: have each "page" (batch of infinite-scrolling rows) be a separate tbody, and reload them individually
  • m

    mysterious-toddler-20573

    10/15/2022, 11:12 PM
    but that's not ideal obviously
  • m

    mysterious-toddler-20573

    10/15/2022, 11:12 PM
    yes, that's my thought too
  • m

    mysterious-toddler-20573

    10/15/2022, 11:12 PM
    You could also sync the infinite scroll and the poll on the element
  • m

    mysterious-toddler-20573

    10/15/2022, 11:12 PM
    so that they don't interfere w/ one another
  • m

    mysterious-toddler-20573

    10/15/2022, 11:13 PM
    but you'll need to pass up the total pages on the poll
  • g

    gorgeous-airport-54386

    10/15/2022, 11:13 PM
    a live, infinite scrolling list seems hard
  • b

    blue-gold-89534

    10/15/2022, 11:13 PM
    damn
  • b

    blue-gold-89534

    10/15/2022, 11:13 PM
    I thought I almost had it 😦
  • g

    gorgeous-airport-54386

    10/15/2022, 11:13 PM
    the further the user scrolls the more the bandwidth use increases
  • b

    blue-gold-89534

    10/15/2022, 11:13 PM
    mhm yeah I know ... infinite scrolling is not the best of options in general
  • g

    gorgeous-airport-54386

    10/15/2022, 11:13 PM
    but it'd be a real cool demo if you pulled it off
  • g

    gorgeous-airport-54386

    10/15/2022, 11:14 PM
    infinite dbmonster
  • b

    blue-gold-89534

    10/15/2022, 11:15 PM
    hm .... maybe I have to bury that idea 😦
  • m

    mysterious-toddler-20573

    10/15/2022, 11:37 PM
    no, I think it's doable
  • m

    mysterious-toddler-20573

    10/15/2022, 11:37 PM
    I think you'd need to keep some state in terms of what pages are being shown, maybe via a hidden input
  • m

    mysterious-toddler-20573

    10/15/2022, 11:37 PM
    if you have the hidden input multiple times, you'd need to consider the max of all values
  • m

    mysterious-toddler-20573

    10/15/2022, 11:37 PM
    and then use hx-sync to coordinate the two requests
  • m

    mysterious-toddler-20573

    10/15/2022, 11:38 PM
    It's doable, I'm pretty sure
  • m

    mysterious-toddler-20573

    10/15/2022, 11:38 PM
    definitely advanced htmx though
  • b

    blue-gold-89534

    10/15/2022, 11:40 PM
    mhm ... not the answer i hoped for tbh 😦
  • b

    bitter-machine-55943

    10/16/2022, 3:21 AM
    Is HTMX a good fit for third-party components? Like we use SyncFusion in one of our apps, with Gantt charts and so on. Or is this where I’d want separate server-side APIs, like an “HTMX API” (returning HTML) and a “data API” (returning JSON)?
  • m

    miniature-lizard-24702

    10/16/2022, 2:50 PM
    how does Hotwired: Turbo compare to HTMX?
  • m

    miniature-lizard-24702

    10/16/2022, 2:51 PM
    Why use HTMX over turbo?
1...859860861...1146Latest