You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using hx-post to insert a new table row results in unexpected behaviour. After form submit the row shows up at the 'top' of the table vs where the hx-target tag is.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Using hx-post to insert a new table row results in unexpected behaviour. After form submit the row shows up at the 'top' of the table vs where the hx-target tag is.
Example:
<table> <tr><td>col1</td><td>col2</td><td>col3</td><td>col4</td><td>col5</td></tr> <tr> <insertTarget id="insertTarget"> </insertTarget> </tr> </table> <form hx-post="/post" hx-target="insertTarget" hx-swap="innerHTML"> <input type="email" name="email" placeholder="Enter your email"> <button type="submit">Submit</button> </form>
Result:
Returned html .... ends up above the first row in the table vs where insertTarget is.
2nd question: view source never shows result from hx-post dom result but I see it on the screen
Beta Was this translation helpful? Give feedback.
All reactions