magnificent-camera-86904
03/09/2023, 7:03 AMhx-trigger="keyup[enterKey]"
But no request is sent.ripe-action-67367
03/09/2023, 7:05 AMripe-action-67367
03/09/2023, 7:06 AMmagnificent-camera-86904
03/09/2023, 7:10 AMhx-trigger="click[ctrlKey]"
ctrlKey qualifies as a JavaScript expression.
And if it is, I am not sure why hx-trigger="keyup[enterKey]"
didn't work for me.
Anyway, here is the final code snippet:
js
hx-trigger="keyup[key === 'Enter' && !shiftKey]"
ripe-action-67367
03/09/2023, 7:11 AMripe-action-67367
03/09/2023, 7:11 AMevent[JS expression]
ripe-action-67367
03/09/2023, 7:12 AMripe-action-67367
03/09/2023, 7:12 AMripe-action-67367
03/09/2023, 7:13 AMmagnificent-camera-86904
03/09/2023, 7:14 AMshy-knife-59740
03/09/2023, 2:00 PMhtml
<div hx-get="/posts" hx-target="#test" hx-trigger="load once">postlist:</div>
this sadly doesent load, it loads infinetlyshy-knife-59740
03/09/2023, 2:16 PMDOMContentLoaded
or window.onload
green-addition-61042
03/09/2023, 2:17 PMripe-action-67367
03/09/2023, 2:19 PMripe-action-67367
03/09/2023, 2:31 PM/posts
page contain its own hx-get with hx-trigger=load?shy-knife-59740
03/09/2023, 2:31 PMshy-knife-59740
03/09/2023, 2:31 PMripe-action-67367
03/09/2023, 2:32 PMshy-knife-59740
03/09/2023, 2:32 PMshy-knife-59740
03/09/2023, 2:33 PMshy-knife-59740
03/09/2023, 2:33 PMripe-action-67367
03/09/2023, 2:33 PMripe-action-67367
03/09/2023, 2:34 PMripe-action-67367
03/09/2023, 2:35 PMshy-knife-59740
03/09/2023, 2:35 PMripe-action-67367
03/09/2023, 2:35 PMshy-knife-59740
03/09/2023, 2:36 PMhx-request
header, it returns a jinja template
- if there is no hx-request
header, it simply returns json with all the datashy-knife-59740
03/09/2023, 2:36 PMshy-knife-59740
03/09/2023, 2:38 PMripe-action-67367
03/09/2023, 2:39 PM