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

    mysterious-toddler-20573

    10/14/2022, 6:23 PM
    OKOK, OK
  • m

    mysterious-toddler-20573

    10/14/2022, 6:27 PM
    looks like
    me.reset()
    works
  • m

    mysterious-toddler-20573

    10/14/2022, 6:27 PM
    in safari
  • m

    mysterious-toddler-20573

    10/14/2022, 6:27 PM
    will investigate what's going on there
  • l

    limited-dress-93789

    10/14/2022, 7:24 PM
    Hm, still no luck. Do I need anything but the standard HTMX JS file included to trigger the
    _=""
    handling?
  • m

    mysterious-toddler-20573

    10/14/2022, 7:27 PM
    AH
  • m

    mysterious-toddler-20573

    10/14/2022, 7:27 PM
    lol
  • m

    mysterious-toddler-20573

    10/14/2022, 7:27 PM
    yes, hyperscript is a separate proejct
  • m

    mysterious-toddler-20573

    10/14/2022, 7:27 PM
    lol
  • m

    mysterious-toddler-20573

    10/14/2022, 7:27 PM
    my bad
  • l

    limited-dress-93789

    10/14/2022, 7:30 PM
    So the script include you have in your URL is pulling in both?
  • m

    mysterious-toddler-20573

    10/14/2022, 7:30 PM
    ah, yes
  • m

    mysterious-toddler-20573

    10/14/2022, 7:30 PM
    demo.htmx.org does automatically load both
  • l

    limited-dress-93789

    10/14/2022, 7:36 PM
    Nice. Starts working if you do it right 🙃.
  • l

    limited-dress-93789

    10/14/2022, 7:40 PM
    I've numbered the ``s of the individual entries. When I issue the delete of an individual entry via AJAX, is there an easy, client-side (hyperscript) way to update the indexes of all following entries? I.e. assume we have 1, 2, 3, 4. I delete 2 and need 3 and for to be decreased.
  • m

    mysterious-toddler-20573

    10/14/2022, 7:47 PM
    I would refresh the whole list, a lot easier
  • m

    mysterious-toddler-20573

    10/14/2022, 7:47 PM
    otherwise you've got some work to do
  • m

    mysterious-toddler-20573

    10/14/2022, 7:47 PM
    make the hx-delete target the entire list
  • m

    mysterious-toddler-20573

    10/14/2022, 7:47 PM
    easy peasy
  • l

    limited-dress-93789

    10/14/2022, 7:52 PM
    Hm, that would have to server-render and transfer the exact HTML that's already in the browser except the indexes.
  • l

    limited-dress-93789

    10/14/2022, 7:53 PM
    Just removing the indexes from the markup would be an even easier alternative.
  • l

    limited-dress-93789

    10/14/2022, 7:53 PM
    I mean in general. Not having them in there in the first place.
  • m

    mysterious-toddler-20573

    10/14/2022, 7:58 PM
    sure
  • m

    mysterious-toddler-20573

    10/14/2022, 7:58 PM
    I think you would find that the perf diff based on a small UI update and refreshing the whole list would be negligible vs. the connection setup time, etc.
  • m

    mysterious-toddler-20573

    10/14/2022, 7:58 PM
    but that's just a hunch
  • m

    mysterious-toddler-20573

    10/14/2022, 7:59 PM
    whatever is simplest is best, is my usual rule
  • l

    limited-dress-93789

    10/14/2022, 8:18 PM
    Triggering the server delete and rendering the list seems to make the least convoluted setup.
  • b

    brainy-ice-92385

    10/14/2022, 9:22 PM
    There does not appear to be a way to switch off the
    document.title
    change on swap - is that correct?
  • m

    mysterious-toddler-20573

    10/14/2022, 9:32 PM
    not as it stands unfortunatley
  • m

    mysterious-toddler-20573

    10/14/2022, 9:32 PM
    but we can fix that!
1...856857858...1146Latest