import { Controller } from '@hotwired/stimulus'; export default class extends Controller { static targets = ['checkbox']; checkAll() { this.checkboxTargets.map((x) => (x.checked = true)); } uncheckAll() { this.checkboxTargets.map((x) => (x.checked = false)); } }