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

    cold-elephant-75958

    08/18/2022, 10:47 AM
    You were right
  • c

    cold-elephant-75958

    08/18/2022, 10:47 AM
    Just tested it, works
  • c

    cold-elephant-75958

    08/18/2022, 10:47 AM
    by any chance
  • c

    cold-elephant-75958

    08/18/2022, 10:48 AM
    any idea how to access the current item in an x-for other than x-text ?
  • c

    cold-elephant-75958

    08/18/2022, 10:50 AM
    i wanted to pass that x-text value as a parameter into that url
  • b

    brave-dog-98297

    08/18/2022, 10:51 AM
    What's the framework?
  • c

    cold-elephant-75958

    08/18/2022, 11:04 AM
    its a template
  • c

    cold-elephant-75958

    08/18/2022, 11:04 AM
    thymeleaf
  • c

    cold-elephant-75958

    08/18/2022, 11:04 AM
    https://stackoverflow.com/questions/67928894/alpinejs-how-to-pass-a-x-for-variable-to-an-x-data-function
  • c

    cold-elephant-75958

    08/18/2022, 11:05 AM
    i found this
  • c

    cold-elephant-75958

    08/18/2022, 11:05 AM
    was going to test it
  • b

    brave-dog-98297

    08/18/2022, 11:08 AM
    They're a good link in the #940241072959922176 channel on thymeleaf
  • c

    cold-elephant-75958

    08/18/2022, 11:09 AM
    okay thanks
  • b

    blue-ghost-19146

    08/18/2022, 3:35 PM
    Quick question about hx-trigger modifiers: what is the correct order of modifiers for
    hx-trigger="keyup changed from:#foo delay:500ms"
    ? No amount of reordering seems to work! Demo here, if anyone can lend a hand: https://codepen.io/benlenton/pen/bGvOQWY?editors=1001
  • m

    mysterious-toddler-20573

    08/18/2022, 3:36 PM
    unfortunately the "changed" modifier is applying to the div, rather than the input
  • m

    mysterious-toddler-20573

    08/18/2022, 3:36 PM
    🤦‍♂️
  • m

    mysterious-toddler-20573

    08/18/2022, 3:37 PM
    can you move the trigger to the input?
  • b

    blue-ghost-19146

    08/18/2022, 3:41 PM
    Ah I see! I'm struggling to see how I could in this scenario.
  • m

    mysterious-toddler-20573

    08/18/2022, 3:42 PM
    you could write a filter
  • m

    mysterious-toddler-20573

    08/18/2022, 3:42 PM
    it'd be ugly but it would work
  • b

    blue-ghost-19146

    08/18/2022, 3:42 PM
    So moving the
    changed
    modifier to after the
    from:
    doesn't alter the target of "changed"? e.g.
    hx-trigger="keyup from:#foo changed delay:500ms"
  • t

    tall-dinner-62086

    08/18/2022, 3:47 PM
    Just move the trigger to the input and add an
    hx-target
    attribute to make it target the div
  • t

    tall-dinner-62086

    08/18/2022, 3:49 PM
    Copy code
    html
    <div id="bar">
      --
    </div>
    
    <input id="foo" hx-trigger="keyup changed delay:500ms" hx-get="/bar" hx-target="#bar">
      --
    </input>
  • b

    blue-ghost-19146

    08/18/2022, 3:49 PM
    Unfortunately the irl example is a bit more complex than that. I'm trying to put together a simplified demo now, because I'm probably missing a simple solution
  • t

    tall-dinner-62086

    08/18/2022, 3:50 PM
    Is it so complex that you can't give the target an id to put into your input?
  • m

    mysterious-toddler-20573

    08/18/2022, 4:05 PM
    we can figure something out
  • m

    mysterious-toddler-20573

    08/18/2022, 4:05 PM
    frankly it's a bug
  • b

    blue-ghost-19146

    08/18/2022, 4:05 PM
    The input is inside an hx-boosted form which can be submitted by various triggers. Moving the trigger to the input is an option, but I was struggling to see how the other enclosed form values would be submitted. I've found a workaround by using
    hx-include
    , but is there a way to make the input still trigger the form submission instead?
  • b

    blue-ghost-19146

    08/18/2022, 4:06 PM
    please don't ask me to raise a PR please don't ask me to raise a PR 😆
  • b

    blue-ghost-19146

    08/18/2022, 4:07 PM
    I actually found another bug a while back and still haven't got round to raising an issue/PR for it. One day soon!
1...782783784...1146Latest