gorgeous-ghost-95789
11/23/2021, 9:55 PMuser
11/24/2021, 2:37 AMuser
11/24/2021, 2:41 AMmysterious-toddler-20573
11/24/2021, 3:01 AMsparse-musician-64201
11/24/2021, 5:54 AMuser
11/24/2021, 8:01 AMgreen-addition-61042
11/24/2021, 8:19 AMsalmon-oil-67352
11/24/2021, 9:15 AMred-farmer-97020
11/24/2021, 10:57 AMmysterious-toddler-20573
11/24/2021, 3:19 PMapplescript
on htmx:afterRequest set the #inputs-id's value to ""salmon-oil-67352
11/24/2021, 3:22 PMsalmon-oil-67352
11/24/2021, 3:22 PMmysterious-toddler-20573
11/24/2021, 3:23 PMbland-coat-6833
11/24/2021, 3:42 PMswap: the messages into the DOM. Is there a way to add to my inbox table, or do I need to deploy some other scripting?bland-coat-6833
11/24/2021, 3:48 PMhx-swap ftwbland-coat-6833
11/24/2021, 3:48 PMmysterious-toddler-20573
11/24/2021, 3:55 PMbland-coat-6833
11/24/2021, 4:05 PMstocky-pencil-9021
11/24/2021, 4:12 PMchange. The server responds with HTML, which is then replaced on the page.
The race condition happens in this scenario:
- User selects checkbox 1, request 1 goes out
- User in addition selects checkbox 2, request 2 goes out
- Request 2 comes back first, the HTML is replaced. The HTML response has details about checkbox 1 and checkbox 2
- Request 1 comes back, with HTML that only contains details about checkbox 1.
The delay modifier doesn't solve this issue in theory because even if there is a delay of say 500ms between checkbox 1 and 2 being selected, it's still technically possible for request 2 to come back first.
The way we were solving this via plain JS was to store the request time of the most recent request and ignore any updates that were < that request time.
Does htmx offer anything like that solution?mysterious-toddler-20573
11/24/2021, 5:17 PMfrom: CSS selector that matches both checkboxes. This will use a single request queue for all requests.mysterious-toddler-20573
11/24/2021, 5:17 PMstocky-pencil-9021
11/24/2021, 5:19 PMmysterious-toddler-20573
11/24/2021, 5:26 PMstocky-pencil-9021
11/24/2021, 5:43 PMrefined-waiter-90422
11/24/2021, 7:09 PMenough-grass-99356
11/24/2021, 7:44 PMlate-king-98305
11/25/2021, 1:01 AMred-farmer-97020
11/25/2021, 1:08 AMred-farmer-97020
11/25/2021, 1:09 AM