rapid-chef-91464
04/30/2021, 3:26 AMsalmon-xylophone-28580
04/30/2021, 6:00 AMsalmon-xylophone-28580
04/30/2021, 6:26 AMhx-swap-oob has an issue. It can't handle a mixture of <tr> and <div> tags. The root cause is parseFromString() of the browser. For me this is really a blocker for my project. I created some ideas how this could be handled in the future. Please have a look at the proposed solutions and provide feedback. If you have an idea how to solve this, please speak up. Thank you:
https://github.com/bigskysoftware/htmx/issues/469most-jelly-15242
04/30/2021, 11:30 AMblue-manchester-57655
04/30/2021, 12:05 PMmysterious-toddler-20573
04/30/2021, 12:49 PMHX-Trigger headermysterious-toddler-20573
04/30/2021, 12:49 PMthankful-addition-60522
04/30/2021, 1:54 PMechoing-dress-67727
04/30/2021, 2:12 PMhx-get on them, they should still work, right?mysterious-toddler-20573
04/30/2021, 2:16 PMmysterious-toddler-20573
04/30/2021, 2:16 PMechoing-dress-67727
04/30/2021, 2:17 PMmysterious-toddler-20573
04/30/2021, 2:17 PMhtmx.process https://htmx.org/api/#processechoing-dress-67727
04/30/2021, 2:30 PMechoing-dress-67727
04/30/2021, 2:30 PMblue-manchester-57655
04/30/2021, 2:33 PM<div class="leaflet-popup leaflet-zoom-animated" style="opacity: 1; transform: translate3d(478px, 284px, 0px); bottom: -7px; left: -118px;"><div class="leaflet-popup-content-wrapper"><div class="leaflet-popup-content" style="width: 196px;">
<div hx-get="/mouse_entered" hx-trigger="mouseenter" hx-target="#data-div" hx-swap="outerHTML">
Bench 16 ft parshall flume (Turnout)
</div>
<div id="data-div"></div>
<a href="/assets/waterways/field/update/undefined" title="Edit this Control Point" class="pl-3">
<i class="fal fa-edit text-warning"></i>
</a>
<a data-id="/assets/waterways/field/delete/undefined/" title="Delete this Control Point" class="delete-item pl-1 pr-2">
<i class="fal fa-minus-circle text-warning"></i>
</a>
</div></div><div class="leaflet-popup-tip-container"><div class="leaflet-popup-tip"></div></div><a class="leaflet-popup-close-button" href="#close">Ć</a></div>
Any recommendation for moving forward with this?echoing-dress-67727
04/30/2021, 2:34 PMhtmx.process mentioned above for my question? It sounds like you might be having a similar issue to mine, maybeblue-manchester-57655
04/30/2021, 2:34 PMechoing-dress-67727
04/30/2021, 2:35 PMhtmx.process(document.body) in your console, assuming htmx is defined as a globalblue-manchester-57655
04/30/2021, 2:36 PMechoing-dress-67727
04/30/2021, 2:36 PMechoing-dress-67727
04/30/2021, 2:36 PMblue-manchester-57655
04/30/2021, 2:38 PMmysterious-toddler-20573
04/30/2021, 3:07 PMmysterious-toddler-20573
04/30/2021, 3:08 PMmysterious-toddler-20573
04/30/2021, 3:09 PMblue-manchester-57655
04/30/2021, 3:47 PMfunction layerOnClick() {
htmx.process(document.body);
}
And then add a click call on each layer before adding it to the map.
layer.on('click', layerOnClick);mysterious-toddler-20573
04/30/2021, 3:48 PMblue-manchester-57655
04/30/2021, 3:48 PM