https://htmx.org logo
Join Discord
Powered by
# htmx-general
  • I can keep the "iterator position" on the server-side and return a portion of rows and swap with htmx - it works, but that's too much load on the server
    s

    some-airline-73512

    04/05/2023, 8:58 PM
    I can keep the "iterator position" on the server-side and return a portion of rows and swap with htmx - it works, but that's too much load on the server
  • and maybe a custom swap algorithm
    m

    mysterious-toddler-20573

    04/05/2023, 8:58 PM
    and maybe a custom swap algorithm
  • Can you keep the cursor client side, using JS or something?
    m

    mysterious-toddler-20573

    04/05/2023, 8:59 PM
    Can you keep the cursor client side, using JS or something?
  • Of course
    s

    some-airline-73512

    04/05/2023, 8:59 PM
    Of course
  • You could do that and then trigger events from JS and have htmx handle the request/swapping
    m

    mysterious-toddler-20573

    04/05/2023, 8:59 PM
    You could do that and then trigger events from JS and have htmx handle the request/swapping
  • Then every scroll triggers a lot of http requests
    s

    some-airline-73512

    04/05/2023, 9:00 PM
    Then every scroll triggers a lot of http requests
  • that's something to fix then
    m

    mysterious-toddler-20573

    04/05/2023, 9:00 PM
    that's something to fix then
  • If user scrolls it can generate 20 requests easily
    s

    some-airline-73512

    04/05/2023, 9:00 PM
    If user scrolls it can generate 20 requests easily
  • Maybe w/ a temporary client-side stand in and only request when scrolling has "settled down"
    m

    mysterious-toddler-20573

    04/05/2023, 9:00 PM
    Maybe w/ a temporary client-side stand in and only request when scrolling has "settled down"
  • debounce it somehow
    m

    mysterious-toddler-20573

    04/05/2023, 9:00 PM
    debounce it somehow
  • at the end of the day you are making a really dynamic table experience happen over HTTP, it's gonna be some work
    m

    mysterious-toddler-20573

    04/05/2023, 9:01 PM
    at the end of the day you are making a really dynamic table experience happen over HTTP, it's gonna be some work
  • I'm thinking whether it's even a good idea or not
    s

    some-airline-73512

    04/05/2023, 9:01 PM
    I'm thinking whether it's even a good idea or not
  • <:grug:1033031455300927558>
    m

    mysterious-toddler-20573

    04/05/2023, 9:02 PM
  • I'm thinking maybe just for this table I could use react and it has some tables with already rows loading built in
    s

    some-airline-73512

    04/05/2023, 9:02 PM
    I'm thinking maybe just for this table I could use react and it has some tables with already rows loading built in
  • If I just constrain the React evil just to this table, maybe I would be okay with complexity
    s

    some-airline-73512

    04/05/2023, 9:03 PM
    If I just constrain the React evil just to this table, maybe I would be okay with complexity
  • yeah, if its baked in to whatever and easy enough, I'd use that and keep it an island, integrate w/ the rest of the app via events
    m

    mysterious-toddler-20573

    04/05/2023, 9:03 PM
    yeah, if its baked in to whatever and easy enough, I'd use that and keep it an island, integrate w/ the rest of the app via events
  • Okay great, thank you <@725789255590215732>
    s

    some-airline-73512

    04/05/2023, 9:04 PM
    Okay great, thank you @mysterious-toddler-20573
  • look up virtual scrolling
    o

    orange-umbrella-16693

    04/05/2023, 9:17 PM
    look up virtual scrolling
  • <@725789255590215732> werent you `(single & grug-pilled)` yesturay? xdd
    s

    shy-knife-59740

    04/06/2023, 9:52 AM
    @mysterious-toddler-20573 werent you
    (single & grug-pilled)
    yesturay? xdd
  • The 5000 rows could be (lazily) fetched by a worker in the background. With hyperscript communicating with the worker is very isy. The problem is that the worker has no access to the document API and thus the elements should be created by the main thread on the fly. In this way you could write some logic to cap the max number of rows that should be in DOM I did something similar in a React Table APP for we needed dedicated indexes in order to apply custom filtering logic. The creation of those indexes was blocking the main thread. Besides the pain of the postMessage API that worked in our case
    n

    numerous-agent-22346

    04/06/2023, 10:43 AM
    The 5000 rows could be (lazily) fetched by a worker in the background. With hyperscript communicating with the worker is very isy. The problem is that the worker has no access to the document API and thus the elements should be created by the main thread on the fly. In this way you could write some logic to cap the max number of rows that should be in DOM I did something similar in a React Table APP for we needed dedicated indexes in order to apply custom filtering logic. The creation of those indexes was blocking the main thread. Besides the pain of the postMessage API that worked in our case
  • Hello guys, Im using HyperView and im trying to set the background color with hexa value, but apparently accoring to docs this only works for the color attribute, and background color attribute takes type color
    d

    delightful-ambulance-44416

    04/06/2023, 11:34 AM
    Hello guys, Im using HyperView and im trying to set the background color with hexa value, but apparently accoring to docs this only works for the color attribute, and background color attribute takes type color
  • any way around this?
    d

    delightful-ambulance-44416

    04/06/2023, 11:34 AM
    any way around this?
  • anybody any idea if i am using this feature right ?
    c

    cool-match-83608

    04/06/2023, 1:05 PM
    anybody any idea if i am using this feature right ?
  • @HxTrigger("HX-Trigger : download") fun download(model: Model) { print("--------------------->TEST<-----------------------") model.addAttribute("others", reportFileGenerationLifecycle.findAllOthers()) }
    c

    cool-match-83608

    04/06/2023, 1:05 PM
    @HxTrigger("HX-Trigger : download") fun download(model: Model) { print("--------------------->TEST<-----------------------") model.addAttribute("others", reportFileGenerationLifecycle.findAllOthers()) }
  • I want to be able to trigger a method in my controller
    c

    cool-match-83608

    04/06/2023, 1:05 PM
    I want to be able to trigger a method in my controller
  • infact i want to trigger 2 methods through a single button
    c

    cool-match-83608

    04/06/2023, 1:06 PM
    infact i want to trigger 2 methods through a single button
  • <form id="generateReportForm" action="#" th:action="@{/report-file-generation/credit-reconciliation-report/save-entry}" th:object="${otherForm}" hx-trigger="download" hx-boost="true" hx-push-url="false" hx-target="#othersTable" hx-swap="innerHTML" method="get"></form>
    c

    cool-match-83608

    04/06/2023, 1:06 PM
    <form id="generateReportForm" action="#" th:action="@{/report-file-generation/credit-reconciliation-report/save-entry}" th:object="${otherForm}" hx-trigger="download" hx-boost="true" hx-push-url="false" hx-target="#othersTable" hx-swap="innerHTML" method="get">
  • maybe i am missing something
    c

    cuddly-keyboard-70746

    04/06/2023, 2:25 PM
    maybe i am missing something
  • is there any Javascript API for the hx-push-url?
    b

    blue-cartoon-81346

    04/06/2023, 2:28 PM
    is there any Javascript API for the hx-push-url?
  • how can I push the url with javascript
    b

    blue-cartoon-81346

    04/06/2023, 2:28 PM
    how can I push the url with javascript
1...108710881089...1146Latest