ripe-action-67367
01/16/2023, 5:31 PMripe-action-67367
01/16/2023, 5:37 PMripe-action-67367
01/16/2023, 5:37 PMmysterious-toddler-20573
01/16/2023, 5:40 PMsome-airline-73512
01/16/2023, 6:00 PMsome-airline-73512
01/16/2023, 6:01 PMsome-airline-73512
01/16/2023, 6:04 PMhtml
<form hx-select-oob="{{const.stTableSwapOob}}" script="init noEnter(me)">
some-airline-73512
01/16/2023, 6:06 PMsome-airline-73512
01/16/2023, 6:08 PMmorph:outerHTML
, the swapped element just disappears. When using regular outerHTML
, it works well.
So I'm debugging htmx source for few hours already, I found this line that removes the node:
js
oobElement.parentNode.removeChild(oobElement);
I'm not sure what is the contract between morph extension and the htmx core. Seems like extension is supposed to insert the node into the DOM, but I don't know how to fix this. Anyone can show me the direction how it should work?ripe-action-67367
01/16/2023, 6:12 PM{{const.stTableSwapOob}}
, and it also has all the data that's gonna be swapped. Instead of having it selected by hx-select-oob
on the page, I would just use knowledge of the server and respond
html
<div id="st-colors-search" hx-swap-oob="true">...</div>
<div id="st-impressionss-search" hx-swap-oob="true">...</div>
<div id="st-cpcs-search" hx-swap-oob="true">...</div>
...
this way you don't need to care about server response in your client-side selector at allsome-airline-73512
01/16/2023, 6:13 PMhx-swap-oob="true"
some-airline-73512
01/16/2023, 6:14 PMripe-action-67367
01/16/2023, 6:14 PMsome-airline-73512
01/16/2023, 6:14 PMhx-swap-oob
attribute or notripe-action-67367
01/16/2023, 6:15 PMripe-action-67367
01/16/2023, 6:15 PMsome-airline-73512
01/16/2023, 6:15 PMtall-dinner-62086
01/16/2023, 6:17 PMhx-swap-oob="true"
ripe-action-67367
01/16/2023, 6:18 PMsome-airline-73512
01/16/2023, 6:20 PMsome-airline-73512
01/16/2023, 6:20 PMhx-select-oob
I have to use hx-swap-oob
with morphingsome-airline-73512
01/16/2023, 6:21 PMsome-airline-73512
01/16/2023, 6:21 PMripe-action-67367
01/16/2023, 6:22 PMripe-action-67367
01/16/2023, 6:22 PMripe-action-67367
01/16/2023, 6:23 PMsome-airline-73512
01/16/2023, 6:26 PMsome-airline-73512
01/16/2023, 6:26 PMsome-airline-73512
01/16/2023, 6:30 PM