1import { Controller } from '@hotwired/stimulus' 2 3// Connects to data-controller="form" 4export default class extends Controller { 5 static targets = ['check'] 6 7 connect() {} 8 9 disconnect() {} 10 11 initialize() {} 12 13 only(event) { 14 event.preventDefault() 15 16 let toCheck = event.target.dataset.id 17 this.checkTargets.forEach((checkBox) => { 18 checkBox.checked = checkBox.id == toCheck 19 }) 20 event.target.dispatchEvent(new CustomEvent('change', { bubbles: true })) 21 } 22 23 all(event) { 24 event.preventDefault() 25 this.checkTargets.forEach((checkBox) => { 26 checkBox.checked = true 27 }) 28 event.target.dispatchEvent(new CustomEvent('change', { bubbles: true })) 29 } 30}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.