makes client selection not contanimate other tabs
This commit is contained in:
@@ -8,6 +8,15 @@ document.addEventListener('alpine:init', () => {
|
||||
el.removeEventListener('htmx:configRequest', config);
|
||||
})
|
||||
})
|
||||
Alpine.directive('hx-header', (el, { value, expression }, { evaluateLater, effect, cleanup, evaluate }) => {
|
||||
var config = function(evt) {
|
||||
evt.detail.headers[value] = evaluate(expression); // add a new parameter into the request
|
||||
}
|
||||
el.addEventListener('htmx:configRequest', config);
|
||||
cleanup(() => {
|
||||
el.removeEventListener('htmx:configRequest', config);
|
||||
})
|
||||
})
|
||||
|
||||
Alpine.directive('dispatch', (el, { value, expression }, { evaluateLater, effect, cleanup, evaluate }) => {
|
||||
let dependent_properties = evaluateLater(expression)
|
||||
|
||||
Reference in New Issue
Block a user