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

    mysterious-toddler-20573

    02/26/2023, 1:21 AM
    I think dropzone fires events that you can listen for on the form
  • m

    mysterious-toddler-20573

    02/26/2023, 1:21 AM
    i may have added them 🙂
  • m

    mysterious-toddler-20573

    02/26/2023, 1:22 AM
    https://github.com/dropzone/dropzone/pull/1925
  • m

    mysterious-toddler-20573

    02/26/2023, 1:22 AM
    gettin' old's a b, folks
  • m

    mysterious-toddler-20573

    02/26/2023, 1:22 AM
    so, one idea is to add an hx-trigger to your form to listen for the upload completion event (no idea what it's called)
  • m

    mysterious-toddler-20573

    02/26/2023, 1:24 AM
    looks like maybe the
    completemultiple
    event? https://github.com/dropzone/dropzone/blob/main/src/options.js#L778
  • m

    mysterious-toddler-20573

    02/26/2023, 1:25 AM
    or maybe
    successmultiple
  • m

    mysterious-toddler-20573

    02/26/2023, 1:25 AM
    ?
  • l

    little-kilobyte-16316

    02/26/2023, 1:27 AM
    I think It might
    successMultiple
    . I'll check. What would adding the
    hx-trigger
    do though? Clicking the submit button sends the Dropzone XML request, and the HTMX posts right after.
  • l

    little-kilobyte-16316

    02/26/2023, 1:35 AM
    Ehh whatever, I'm so over this. I don't know JS nearly well enough. I'll just make something up on the backend. lmao Thanks anyways @mysterious-toddler-20573
  • m

    mysterious-toddler-20573

    02/26/2023, 1:54 AM
    🙂 well, I think what you want is for the images to upload then submit the form, but I'm not sure
  • m

    mysterious-toddler-20573

    02/26/2023, 1:54 AM
    sorry, wish I could be of more help
  • l

    little-kilobyte-16316

    02/26/2023, 2:05 AM
    How does the
    hx-trigger
    dropzone:
    work? My dropzone is declared imperatively in my external JS file. (split by webpack, and seperate from HTMX). Do I have to add my Dropzone to the window? or document? Using just
    dropzone:
    does nothing for me.
  • e

    elegant-raincoat-69176

    02/26/2023, 9:13 AM
    Is it possible to fire an htmx trigger to load a select when a form is made visible?
  • e

    elegant-raincoat-69176

    02/26/2023, 9:14 AM
    And even better load a pair of selects when a form is made visible, in my case, both selects have the same content, if that helps.
  • e

    elegant-raincoat-69176

    02/26/2023, 9:15 AM
    Discord's search is god-awful BTW.
  • e

    elegant-raincoat-69176

    02/26/2023, 9:17 AM
    My query, of course, presumes such a trigger exists, though it is entirely possible it does not, given it's a CSS change rather than anything in the DOM as such. Which might just answer my question.
  • e

    elegant-raincoat-69176

    02/26/2023, 9:35 AM
    Actually I think intersection should do the job...
  • s

    some-airline-73512

    02/26/2023, 9:59 AM
    Anyone looked at the Qwik framework? Why is the craze about it?
  • g

    gorgeous-airport-54386

    02/26/2023, 10:01 AM
    when you do ssr, the server serializes internal state and puts it in the html so the client won't compute the same thing again
  • g

    gorgeous-airport-54386

    02/26/2023, 10:01 AM
    also it can download event handler code when the event actually happens
  • s

    some-airline-73512

    02/26/2023, 10:26 AM
    Okay, so another complication
  • s

    some-airline-73512

    02/26/2023, 10:26 AM
    Maybe there are some ideas to learn from them? To incorporate into htmx
  • r

    ripe-action-67367

    02/26/2023, 10:37 AM
    There was a discussion about implementing lazy attribute evaluation, inspired by qwik
  • o

    orange-umbrella-16693

    02/26/2023, 10:48 AM
    It's nice because it allows you to use heavyweight libraries for example without having to think about the resulting bundle size because the initial load will always be tiny and as page features are exposed you download more JS incrementally
  • o

    orange-umbrella-16693

    02/26/2023, 10:48 AM
    they call this "finally an O(1) framework instead of O(n)"
  • o

    orange-umbrella-16693

    02/26/2023, 10:50 AM
    the guys behind it are crazy about web performance, just look at Miško's twitter threads
  • s

    some-airline-73512

    02/26/2023, 11:56 AM
    That’s cool. But it’s essentially layering more complexity on top of complexity. I don’t like that
  • o

    orange-umbrella-16693

    02/26/2023, 11:57 AM
    And that's fair, and I agree with you.
  • o

    orange-umbrella-16693

    02/26/2023, 11:57 AM
    It's definitely better than other SPA frameworks out there, even including things like Svelte and SolidJS, and I guess that's their target audience.
1...105110521053...1146Latest