mirror of
https://github.com/bigskysoftware/htmx.git
synced 2026-01-25 05:06:13 +00:00
improve hx-boost advanced config to use new mergeConfig for nesting (#3572)
improve hx-boost advanced config to use new mergeConfig for nesting support Co-authored-by: MichaelWest22 <michael.west@docuvera.com>
This commit is contained in:
@@ -325,9 +325,12 @@ var htmx = (() => {
|
||||
credentials: "same-origin",
|
||||
signal: ac.signal,
|
||||
mode: this.config.mode
|
||||
},
|
||||
...sourceElement._htmx?.boosted
|
||||
}
|
||||
};
|
||||
// Apply boost config overrides
|
||||
if (sourceElement._htmx?.boosted) {
|
||||
this.__mergeConfig(sourceElement._htmx.boosted, ctx);
|
||||
}
|
||||
ctx.target = this.__resolveTarget(sourceElement, ctx.target);
|
||||
|
||||
// Apply hx-config overrides
|
||||
@@ -1006,7 +1009,7 @@ var htmx = (() => {
|
||||
__maybeBoost(elt) {
|
||||
let boostValue = this.__attributeValue(elt, "hx-boost");
|
||||
if (boostValue && boostValue !== "false" && this.__shouldBoost(elt)) {
|
||||
elt._htmx = {eventHandler: this.__createHtmxEventHandler(elt), requests: [], boosted: this.__parseConfig(boostValue)}
|
||||
elt._htmx = {eventHandler: this.__createHtmxEventHandler(elt), requests: [], boosted: boostValue}
|
||||
elt.setAttribute('data-htmx-powered', 'true');
|
||||
if (elt.matches('a') && !elt.hasAttribute("target")) {
|
||||
elt.addEventListener('click', (click) => {
|
||||
|
||||
Reference in New Issue
Block a user