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

    mysterious-toddler-20573

    10/17/2020, 7:33 PM
    trigger filtering is in
    dev
    and I prepped a
    0.3
    release. @User any more details on what you were seeing?
  • g

    gorgeous-ghost-95789

    10/17/2020, 7:34 PM
    Hey @mysterious-toddler-20573. No, I was@not able to replicate it. So, I'm guessing it was a problem with my code. I think you're ok to move forward.
  • g

    gorgeous-ghost-95789

    10/17/2020, 7:34 PM
    Really interested to see this filtering syntax in action!
  • g

    gorgeous-ghost-95789

    10/17/2020, 7:36 PM
    Using this, how would I filter for ”left mouse button only”?
  • m

    mysterious-toddler-20573

    10/17/2020, 8:29 PM
    Copy code
    html
      <div hx-trigger="click[button==0]" ...>...</div>
  • b

    big-airline-13935

    10/17/2020, 8:32 PM
    Looking great!!
  • m

    mysterious-toddler-20573

    10/17/2020, 8:35 PM
    and it's a general javascript expression, so you can do whatever you want in there
  • m

    mysterious-toddler-20573

    10/17/2020, 8:35 PM
    only funkyness is how symbols are resolved: first against the
    event
    object, then against the global scope
  • m

    most-jelly-15242

    10/17/2020, 9:42 PM
    Yes! 🤯
  • m

    mysterious-toddler-20573

    10/17/2020, 9:58 PM
    > Hey @User. No, I was@not able to replicate it. So, I'm guessing it was a problem with my code. I think you're ok to move forward. @User
  • m

    mysterious-toddler-20573

    10/18/2020, 12:00 AM
    https://dev.htmx.org/test/0.3.0/test/
  • m

    mysterious-toddler-20573

    10/18/2020, 12:01 AM
    275 tests
  • m

    mysterious-toddler-20573

    10/18/2020, 12:01 AM
    I want that to some day be 1000
  • m

    mysterious-toddler-20573

    10/18/2020, 12:06 AM
    Is there a good tool for code coverage in javascript w/ sinon.js?
  • m

    mysterious-toddler-20573

    10/18/2020, 12:49 AM
    chrome coverage tools are good enough
  • b

    broad-breakfast-38211

    10/19/2020, 9:48 AM
    Hello, I'm new here, basically I've been a long time Windows desktop software developer, with limited experiences in the web development area. I just like to say, htmx is amazing!
  • b

    broad-breakfast-38211

    10/19/2020, 9:49 AM
    In just one day, I'm able to implemented a license key upgrade page to interact with my activation server: https://docxmanager.com/miscpages/upgrade-to-standard-from-basic.html
  • b

    broad-breakfast-38211

    10/19/2020, 9:49 AM
    Thank you very much for the htmx project, man.
  • b

    broad-breakfast-38211

    10/19/2020, 9:51 AM
    BTW, my DocxManager uses Word documents to build websites (something like WordPress on the desktop) 🙂
  • m

    mysterious-toddler-20573

    10/19/2020, 1:25 PM
    great to hear Edwin
  • m

    most-jelly-15242

    10/19/2020, 4:41 PM
    I've been working on some custom "indicators" functionality for Yoyo using the htmx extension system. Should be out in the next release.
  • l

    lively-beach-14291

    10/19/2020, 5:16 PM
    Oh that's nice.
  • m

    most-jelly-15242

    10/19/2020, 5:22 PM
    Thanks! I'll update the demo once it's released and post a link
  • b

    big-airline-13935

    10/19/2020, 6:16 PM
    Sprig 1.0 (built on the wonderful htmx) will be released this Wednesday at this free online event... https://twitter.com/extendsConf/status/1318184573369548802
  • c

    clean-kitchen-15473

    10/19/2020, 6:28 PM
    hey guys, i was wondering how to use the other statuses on ic-on-error such as status this is for intercooler but i think htmx must be similar i have it as this
    Copy code
    javascript
      ic-on-error="displayError()"
      ic-on-success="hideError()"
    nevermind, i didn't understand what symbols meant but I get it now
  • m

    mysterious-toddler-20573

    10/19/2020, 6:44 PM
    👍
  • m

    most-jelly-15242

    10/20/2020, 9:57 PM
    @User When returning false from
    handleSwap
    in an extension, htmx defaults to
    innerHTML
    swap instead of using
    config.defaultSwapStyle
    https://github.com/bigskysoftware/htmx/blob/938130040f13eeee55965a54bb8c9f722315d881/src/htmx.js#L609 Would you consider changing this to use
    config.defaultSwapStyle
    , or perhaps allow having a secondary swap to use when the extension returns false? For example
    hx-swap="morphdom, outerHTML"
    .
  • q

    quaint-accountant-21340

    10/20/2020, 10:46 PM
    I'm trying to better understand how hx-swap and javascript work together.
  • q

    quaint-accountant-21340

    10/20/2020, 10:49 PM
    In my scenario hx-get returns some html that includes a form with a select widget that will be enhanced with select2. In a perfect world the js to enhance the select to select2 would live with the html. Unfortunately if I include the js in a script tag with the html I get an error like:
    Copy code
    TypeError: Cannot read property 'querySelectorAll' of undefined
        at J (htmx.org@0.2.0:1)
        at $ (htmx.org@0.2.0:1)
        at eval (eval at Re (htmx.org@0.2.0:1), <anonymous>:2:1)
        at Re (htmx.org@0.2.0:1)
        at He (htmx.org@0.2.0:1)
        at htmx.org@0.2.0:1
        at htmx.org@0.2.0:1
        at R (htmx.org@0.2.0:1)
        at i (htmx.org@0.2.0:1)
    I think this is because the js is run before the html is actually in the dom. If it listen on
    htmx:afterSettle
    in the page the target page is works fine but then the everything isn't nicely stored together which is sad. Is there an idiom here I should be using?
  • m

    mysterious-toddler-20573

    10/20/2020, 10:51 PM
    That's a good guess @User
1...565758...1146Latest