-
Hi guys! i've some problem while trying to swap in some kida like what is described here, but the other way. first things first, what i want to achieve:
now, if i return just the here the table row component <tr id={props.ID} class="*:py-2 *:font-medium [&_td:not(:first-child):not(:last-child)]:border-t">
<td>
<span class="status-content flex h-5 px-3.5 rounded-tr-xl rounded-br-xl fhd:rounded-full"></span>
</td>
<td class="pr-3 pl-4 max-w-0 w-full text-sm">
......
</td>
<td class="hidden px-3 sm:table-cell text-sm text-center">....</td>
<td class="">....</td>
<td class="hidden px-3 text-sm sm:table-cell text-center">....</td>
<td class="hidden sm:table-cell text-right pr-4 pl-3 text-sm">
<button
hx-get={.... }
hx-target="body"
hx-swap="beforeend"
class="bg-primary-600 p-2 rounded-xl text-gray-50 hover:bg-primary-900"
>Edit</button>
</td>
</tr> i've tryied to wrap it into a i've add here also the toast component just in case <div
hx-select-oob="#toast-container:innerHTML"
id="toast"
>
@getStatusIcon(props.Type)
<span class="text-wrap max-w-sm">{ props.Message }</span>
</div> |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
This may not solve your issue, but is it not |
Beta Was this translation helpful? Give feedback.
-
SOLVED. if someone else got this issue - the response must wrap the and it will work like a charm. example.
|
Beta Was this translation helpful? Give feedback.
SOLVED.
if someone else got this issue -
the response must wrap the
<tr>
inside a<table><tbody>
( as per HTML specs), then in the element that triggered the request use the hx-select to select the<tr>
from the response and swap it where needed ( using the hx-target + hx-swap tags )and it will work like a charm.
example.