Skip to content

Returning TableRows AND some toast (OOB) #2758

Answered by CRSylar
CRSylar asked this question in Q&A
Discussion options

You must be logged in to vote

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.

templ Wrapper() {
	<table>
		<tbody id="#expensesTable">
			<tr>
			.........
			</tr>
		</tbody>
	</table>
}

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@CRSylar
Comment options

@Telroshan
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by CRSylar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants