fix: initialize htmx on dynamically loaded dom nodes
This commit is contained in:
+1
@@ -50,6 +50,7 @@ export default class extends Controller {
|
||||
this.loadedValue = true
|
||||
this.containerTarget.innerHTML = html
|
||||
this.triggerTarget.remove()
|
||||
htmx.process(this.containerTarget)
|
||||
})
|
||||
.catch(() => {
|
||||
this.loadedValue = false
|
||||
|
||||
+1
@@ -39,6 +39,7 @@ export default class extends Controller {
|
||||
.then(html => {
|
||||
this.resultsContainerTarget.innerHTML = html
|
||||
window.scroll({ top: 0, left: 0, behavior: 'smooth' })
|
||||
htmx.process(this.resultsContainerTarget)
|
||||
})
|
||||
.finally(() => {
|
||||
this.loadingValue = false
|
||||
|
||||
+1
@@ -28,6 +28,7 @@ export default class extends Controller {
|
||||
.then(this.parseHTML)
|
||||
.then(html => {
|
||||
this.containerTarget.innerHTML = html
|
||||
htmx.process(this.containerTarget)
|
||||
})
|
||||
.finally(() => {
|
||||
this.loadingValue = false
|
||||
|
||||
Reference in New Issue
Block a user