Make the dialog sizing property optional

This commit is contained in:
Andy Smith
2025-11-12 11:44:31 -06:00
parent ea41c46bfb
commit 44b0f5f5bc
2 changed files with 4 additions and 3 deletions
@@ -5,7 +5,8 @@ import { limitHeightToViewport } from "helpers/sizing_helpers"
export default class extends Controller {
static targets = [ "dialog" ]
static values = {
modal: { type: Boolean, default: false }
modal: { type: Boolean, default: false },
sizing: { type: Boolean, default: true }
}
connect() {
@@ -22,7 +23,7 @@ export default class extends Controller {
orient(this.dialogTarget)
}
limitHeightToViewport(this.dialogTarget, true)
limitHeightToViewport(this.dialogTarget, this.sizingValue)
this.#loadLazyFrames()
this.dialogTarget.setAttribute("aria-hidden", "false")