great-article-50141
05/26/2023, 4:54 PMminiature-lizard-24702
05/26/2023, 5:00 PMmysterious-toddler-20573
05/26/2023, 5:02 PMmysterious-toddler-20573
05/26/2023, 5:02 PMmysterious-toddler-20573
05/26/2023, 5:02 PMnice-cpu-16963
05/26/2023, 8:30 PMgreat-cartoon-12331
05/26/2023, 8:32 PMgreat-cartoon-12331
05/26/2023, 8:33 PMnice-cpu-16963
05/26/2023, 8:46 PMnice-cpu-16963
05/26/2023, 8:46 PMfreezing-waitress-26396
05/26/2023, 9:23 PMgray-dinner-25100
05/27/2023, 12:03 AMgray-dinner-25100
05/27/2023, 12:04 AMfierce-fish-43125
05/27/2023, 2:17 AMpowerful-army-90860
05/27/2023, 6:11 AM<form class="flex items-center"
id="search-form"
hx-get="{{bot.get_url_list_url}}"
hx-trigger="change, keyup changed delay:500msfrom:#search"
hx-target="#url-form"
>
<label for="search" class="sr-only">Search</label>
<div>
<input type="text"
id="search"
name="url__icontains"
placeholder="Search" required="">
</div>
</form>
shy-zebra-22292
05/27/2023, 7:25 AMdelay:500msfrom:#search
is suspicious to me. Is it on purpose that there is no space between 500ms
and from...
? might it be that js does some weird evaluation of what a delay of value 500msfrom:#search
means? it might not be evaluated as 500ms anymore, that's my thought.
there is a clear space divide in the example:shy-zebra-22292
05/27/2023, 7:28 AMhttps://cdn.discordapp.com/attachments/725789747212976259/1111918722815361054/image.png▾
shy-zebra-22292
05/27/2023, 7:29 AMhx-get
and other attributes on the <form
... Since you have an "on change" listener on the form already I am pretty sure that the <input search
change will bubble up to the <form
so you might not need this part at all from:#search
depending on circumstances.future-appointment-69775
05/27/2023, 9:54 AMhtmx:swapError
before? I'm very confuse why this error occured
html
<tr>
<td colspan="3">
<div class="mt-5 py-12 px-4 bg-gray-50">
<div class="text-center">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-12 h-12 mx-auto text-gray-400">
<path stroke-linecap="round" stroke-linejoin="round" d="M12 10.5v6m3-3H9m4.06-7.19l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z" />
</svg>
<h3 class="text-gray-900 font-semibold text-sm mt-2">No {{ pluralize(type) }}</h3>
<p class="text-gray-500 text-sm mt-1">Get started by creating a new {{ type }}.</p>
<div class="mt-6">
<button
class="inline-block rounded border border-indigo-600 bg-indigo-600 px-5 py-2.5 text-sm font-medium text-white hover:bg-indigo-700 focus:outline-none focus:ring active:text-indigo-500"
hx-get={{ createUrl }}
hx-target="closest tr"
hx-swap="outerHTML"
>
Add {{ type }}
</button>
</div>
</div>
</div>
</td>
</tr>
future-appointment-69775
05/27/2023, 9:55 AMhttps://cdn.discordapp.com/attachments/725789747212976259/1111955887410651236/image.png▾
future-appointment-69775
05/27/2023, 9:55 AMproud-librarian-99598
05/27/2023, 10:04 AMfuture-appointment-69775
05/27/2023, 10:05 AMproud-librarian-99598
05/27/2023, 10:06 AMhx-target
using next
, previous
or find
are useful. Anybody that has used this in a demo or a real world application?future-appointment-69775
05/27/2023, 10:17 AMhttps://cdn.discordapp.com/attachments/725789747212976259/1111961275887525929/image.png▾
https://cdn.discordapp.com/attachments/725789747212976259/1111961276139188315/image.png▾
powerful-army-90860
05/27/2023, 10:20 AMripe-action-67367
05/27/2023, 10:28 AMgreat-orange-45113
05/27/2023, 12:26 PMfuture-appointment-69775
05/27/2023, 12:55 PM