Save three requests per card view
Trade off is potentially a tiny delay on opening when reassigning, but that seems worth it.
This commit is contained in:
@@ -24,6 +24,7 @@ export default class extends Controller {
|
||||
|
||||
limitHeightToViewport(this.dialogTarget, true)
|
||||
|
||||
this.#loadLazyFrames()
|
||||
this.dialogTarget.setAttribute("aria-hidden", "false")
|
||||
this.dispatch("show")
|
||||
}
|
||||
@@ -54,4 +55,8 @@ export default class extends Controller {
|
||||
event.stopPropagation()
|
||||
}
|
||||
}
|
||||
|
||||
#loadLazyFrames() {
|
||||
Array.from(this.dialogTarget.querySelectorAll("turbo-frame")).forEach(frame => { frame.loading = "eager" })
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user