fix: restore unintended file changes after master flatten rewrite

This commit is contained in:
Björn Fromme
2026-03-16 14:15:51 +01:00
parent 49ea562322
commit 6d9265de0f
7 changed files with 41 additions and 3 deletions
@@ -0,0 +1,32 @@
import { Controller } from '@hotwired/stimulus'
export default class extends Controller {
static classes = [ 'hidden' ]
static targets = [ 'container', 'checkboxGroup' ]
static values = { visible: Boolean }
connect() {
this.updateVisibility()
}
check() {
this.updateVisibility()
}
updateVisibility() {
if (!this.hasCheckboxGroupTarget) {
return
}
const checkboxes = this.checkboxGroupTarget.querySelectorAll('input[type="checkbox"]')
const hasChecked = Array.from(checkboxes).some(checkbox => checkbox.checked)
this.visibleValue = hasChecked
}
visibleValueChanged(visible) {
if (this.hasContainerTarget) {
this.containerTarget.classList.toggle(this.hiddenClass, false === visible)
}
}
}
+3
View File
@@ -16,14 +16,17 @@ export default class extends Controller {
trigger: 'click',
allowHTML: true,
interactive: true,
appendTo: document.body,
}
} else {
options = {
content: this.contentValue,
placement,
touch: false,
trigger: 'mouseenter focus',
allowHTML: true,
interactive: true,
appendTo: document.body,
}
}
if (this.hasTriggerTarget) {