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

    mysterious-toddler-20573

    12/06/2022, 4:38 AM
    if you can get away with divs, they are much easier to deal with πŸ˜‘
  • r

    refined-waiter-90422

    12/06/2022, 5:18 AM
    * { display: grid; }
  • t

    thousands-address-25757

    12/06/2022, 5:56 AM
    Is there an option to do a swap (inner/outer) blindly without any processing of the child nodes ? Sometimes we just want to swap an HTML fragment into the DOM without making any checks on the existing target element..
  • t

    thousands-address-25757

    12/06/2022, 5:59 AM
    recently did a swap of a slightly large fragment and noticed it was a bit slow.. was able to improve the performance drastically by avoiding the cleanup logic..
  • sykloid9398 and others interested in
    m

    mammoth-family-48524

    12/06/2022, 9:14 AM
    @mysterious-doctor-98164 and others interested in Shoelace - I made you a present! 🎁 😱 https://raw.githubusercontent.com/benopotamus/htmx-ext-shoelace/main/htmx.ext.shoelace.js. It's my very first HTMX extension. Works with
    <form>
    to automatically grab the values of the form-like Shoelace elements and include them in the submission.
    m
    • 2
    • 6
  • m

    mammoth-family-48524

    12/06/2022, 9:48 AM
    In commemoration of this auspicious occasion, I asked OpenAI Chat to write us a poem πŸ˜„
  • m

    miniature-lizard-24702

    12/06/2022, 10:02 AM
    it doesn't rhyme well
  • m

    miniature-lizard-24702

    12/06/2022, 10:02 AM
    return it
  • b

    bitter-carpet-58319

    12/06/2022, 11:01 AM
    Does HTMX (SPA technique generally) will work inside of frameset? I am aware frameset is obsolette concept, but have old CGI web application utlizing frames and want to slightly improove it utilizing HTMX. Will it work as one SPA will be in one frame? There is not interframe communication, except some akcion in one frame trigger (via JS) reloading of another one.
  • m

    mysterious-toddler-20573

    12/06/2022, 2:01 PM
    Should work within frames fine, with the caveat that inter-frame targeting will not work
  • v

    victorious-thailand-80225

    12/06/2022, 3:05 PM
    Hi, beginner here... 1. How to add a row to a table using htmx? I've tried something like this so far which isn't working. I can't copy code verbatim, so pardon any errors: Main view:
    Copy code
    <table>
     <thead>...</thead>
     <tbody id="deals"></tbody>
    </table>
    I have a websock sending oob s that should go inside the :
    Copy code
    <tr id="deals" hx-swap="beforeend">[some <td>s]</tr>
    Now I see that the s are directly added into the and this causes issues from the second row onwards. I tried wrapping the entire in a but that doesn't work either. How do I get this working properly?
  • b

    boundless-vase-80440

    12/06/2022, 3:10 PM
    your tr has the same id of your tbody?
  • v

    victorious-thailand-80225

    12/06/2022, 3:22 PM
    @boundless-vase-80440 yes
  • l

    lively-addition-84435

    12/06/2022, 3:23 PM
    Hey guys. Is it possible to keep the current search/query string when doing an
    hx-get
    ?
  • b

    boundless-vase-80440

    12/06/2022, 3:27 PM
    maybe this is causing some of the trouble?
  • v

    victorious-thailand-80225

    12/06/2022, 3:35 PM
    @boundless-vase-80440 But without specifying the id of the body, htmx wouldn't know where to append the to right? The oob message is initiated by the server.
  • m

    mysterious-toddler-20573

    12/06/2022, 3:50 PM
    can you surround it in a tbody?
  • m

    mysterious-toddler-20573

    12/06/2022, 3:50 PM
    the id should be on a tbody, w/ a tr inside
  • v

    victorious-thailand-80225

    12/06/2022, 3:51 PM
    ugh
  • v

    victorious-thailand-80225

    12/06/2022, 3:51 PM
    @mysterious-toddler-20573 Yeah that worked!!!
  • v

    victorious-thailand-80225

    12/06/2022, 3:52 PM
    So htmx doesn't put the response inside the target, it puts response's children inside the target?
  • m

    mysterious-toddler-20573

    12/06/2022, 3:53 PM
    with oob it's a little weird
  • v

    victorious-thailand-80225

    12/06/2022, 3:53 PM
    ah ok
  • v

    victorious-thailand-80225

    12/06/2022, 3:53 PM
    Thanks for the help. I was stuck for some timme
  • m

    mysterious-toddler-20573

    12/06/2022, 3:53 PM
    outerHTML (the default) replaces the element
  • m

    mysterious-toddler-20573

    12/06/2022, 3:54 PM
    the before/after/etc. refers to the target element itself, rather than replacement
  • m

    mysterious-toddler-20573

    12/06/2022, 3:54 PM
    I wouldn't say I have thought this out (or documented it) very well
  • m

    mysterious-toddler-20573

    12/06/2022, 3:54 PM
    sorry about that
  • v

    victorious-thailand-80225

    12/06/2022, 3:56 PM
    ok, no problem. Loving htmx so far so can't complain πŸ˜„
  • w

    white-motorcycle-95262

    12/07/2022, 1:45 AM
    I'm sure it's not everyone's favorite, but has anyone outlined steps that should be done to make Google Analytics work with HTMX? 😐
1...934935936...1146Latest