melodic-father-55349
09/23/2022, 1:09 PMgifted-appointment-5037
09/23/2022, 1:27 PMgifted-appointment-5037
09/23/2022, 1:35 PMgentle-finland-44476
09/23/2022, 1:43 PMgentle-finland-44476
09/23/2022, 1:44 PMgentle-finland-44476
09/23/2022, 1:48 PMtall-dinner-62086
09/23/2022, 1:49 PMswap-oop="beforeend"
just sounds wrong to metall-dinner-62086
09/23/2022, 1:49 PMgentle-finland-44476
09/23/2022, 1:53 PMtall-dinner-62086
09/23/2022, 1:55 PMtyping_user.id
then?tall-dinner-62086
09/23/2022, 1:55 PMtall-dinner-62086
09/23/2022, 1:55 PMtall-dinner-62086
09/23/2022, 1:56 PMtall-dinner-62086
09/23/2022, 1:56 PMsilly-soccer-20915
09/23/2022, 6:19 PM<script>
htmx.defineExtension('exclude-from-oob-swap', {
onEvent: function (name, evt) {
if(name === "htmx:oobBeforeSwap"){
console.log(name);
console.log(evt.detail);
console.log(evt.detail.xhr);
console.log(evt.xhr);
}
}
});
</script>
Am I approaching something the wrong way?? Thanks for further answers!mysterious-toddler-20573
09/23/2022, 6:27 PMsilly-soccer-20915
09/23/2022, 6:29 PMsilly-soccer-20915
09/23/2022, 6:31 PMmysterious-toddler-20573
09/23/2022, 6:33 PMmysterious-toddler-20573
09/23/2022, 6:33 PMsilly-soccer-20915
09/23/2022, 6:38 PMsilly-soccer-20915
09/23/2022, 6:40 PMsilly-soccer-20915
09/23/2022, 6:41 PMsilly-soccer-20915
09/23/2022, 8:52 PMsilly-soccer-20915
09/23/2022, 8:52 PMsilly-soccer-20915
09/23/2022, 9:45 PMhtmx.defineExtension('exclude-from-oob-swap', {
onEvent: function (name, evt) {
if (name === "htmx:oobBeforeSwap") {
var xhr = evt.detail.xhr;
var stop = xhr.getResponseHeader('hx-stop-oob') === "true";
if(stop){
evt.detail.shouldSwap = false;
}
}
}
});
but it stops the actual swap that should append the content, altogether with the oob swap ._.silly-soccer-20915
09/23/2022, 10:06 PM<div hx-swap-oob="true"
hx-ext="exclude-from-oob-swap"
class="list-parent"
class="uk-container uk-margin-large-bottom"
<ul class="list">
<li class="list-item">
<!-- if (this is not the last page of items) -->
<span class="uk-width-1-1 trigger"
hx-get="/page2"
hx-trigger="revealed"
hx-indicator="#spinner"
hx-target=".list-parent .list-item:last-child"
hx-select=".list-parent .list-item"
hx-vals='{"infinite-loader": "true"}'
hx-swap="afterend">
</span>
<!-- end if -->
</li>
</ul>
<div id="spinner" class="htmx-indicator uk-text-center"></div>
</div>
silly-soccer-20915
09/23/2022, 10:13 PMsilly-soccer-20915
09/23/2022, 10:15 PM