Make the dialog sizing property optional
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<%= turbo_stream_from Current.user, :notifications %>
|
||||
|
||||
<section class="tray tray--notifications" data-controller="dialog badge" data-badge-unread-class="unread" data-action="turbo:render#update">
|
||||
<section class="tray tray--notifications" data-controller="dialog badge" data-badge-unread-class="unread" data-action="turbo:render#update" data-dialog-sizing-value="false">
|
||||
<dialog class="tray__dialog"
|
||||
data-controller="navigable-list"
|
||||
data-dialog-target="dialog"
|
||||
|
||||
Reference in New Issue
Block a user